@@ -279,7 +279,7 @@ def resume(self, func_scope=None) -> int:
279279 logger .info ("Function {} is resumed." .format (name ))
280280 return time_to_resume
281281
282- def validate_failures (self ):
282+ def validate_failures (self ) -> str :
283283 ignore_failures = ["uv_try_write_failure_counter" ,
284284 "bucket_op_exception_count" , "timestamp" ,
285285 "bkt_ops_cas_mismatch_count" , "bucket_op_cache_miss_count" ,
@@ -297,16 +297,14 @@ def validate_failures(self):
297297 # Validate Execution stats
298298 for stat , value in execution_stats .items ():
299299 if "failure" in stat and value != 0 and stat not in ignore_failures :
300- raise Exception (
301- '{function}: {node}: {stat} is not zero' .format (
302- function = function_stats ["function_name" ], node = node , stat = stat ))
300+ return '{function}: {node}: {stat} is not zero' .format (
301+ function = function_stats ["function_name" ], node = node , stat = stat )
303302
304303 # Validate Failure stats
305304 for stat , value in failure_stats .items ():
306305 if value != 0 and stat not in ignore_failures :
307- raise Exception (
308- '{function}: {node}: {stat} is not zero' .format (
309- function = function_stats ["function_name" ], node = node , stat = stat ))
306+ return '{function}: {node}: {stat} is not zero' .format (
307+ function = function_stats ["function_name" ], node = node , stat = stat )
310308
311309 def print_max_rss_values (self ):
312310 for node in self .eventing_nodes :
@@ -323,8 +321,8 @@ def print_max_rss_values(self):
323321
324322 def debug (self ):
325323 self .print_max_rss_values ()
326- self .validate_failures ()
327- return super ().debug ()
324+ failure = self .validate_failures ()
325+ return failure or super ().debug ()
328326
329327 def run (self ):
330328 self .set_functions ()
0 commit comments