File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
redis_benchmarks_specification/__runner__ Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -2671,6 +2671,14 @@ def delete_temporary_files(
26712671
26722672 if not success :
26732673 logging .error (f"Memtier benchmark failed: { stderr } " )
2674+ # Clean up database after failure (timeout or error)
2675+ if args .flushall_on_every_test_end or args .flushall_on_every_test_start :
2676+ logging .warning ("Benchmark failed - cleaning up database with FLUSHALL" )
2677+ try :
2678+ for r in redis_conns :
2679+ r .flushall ()
2680+ except Exception as e :
2681+ logging .error (f"FLUSHALL failed after benchmark failure: { e } " )
26742682 # Continue with the test but log the failure
26752683 client_container_stdout = f"ERROR: { stderr } "
26762684
@@ -3016,6 +3024,15 @@ def delete_temporary_files(
30163024 print ("-" * 60 )
30173025 test_result = False
30183026
3027+ # Clean up database after exception to prevent contamination of next test
3028+ if args .flushall_on_every_test_end or args .flushall_on_every_test_start :
3029+ logging .warning ("Exception caught - cleaning up database with FLUSHALL" )
3030+ try :
3031+ for r in redis_conns :
3032+ r .flushall ()
3033+ except Exception as e :
3034+ logging .error (f"FLUSHALL failed after exception: { e } " )
3035+
30193036 # Check if user requested exit via Ctrl+C
30203037 if _exit_requested :
30213038 logging .info (
You can’t perform that action at this time.
0 commit comments