Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions redis_benchmarks_specification/__runner__/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,14 @@ def delete_temporary_files(

if not success:
logging.error(f"Memtier benchmark failed: {stderr}")
# Clean up database after failure (timeout or error)
if args.flushall_on_every_test_end or args.flushall_on_every_test_start:
logging.warning("Benchmark failed - cleaning up database with FLUSHALL")
try:
for r in redis_conns:
r.flushall()
except Exception as e:
logging.error(f"FLUSHALL failed after benchmark failure: {e}")
# Continue with the test but log the failure
client_container_stdout = f"ERROR: {stderr}"

Expand Down Expand Up @@ -3014,6 +3022,15 @@ def delete_temporary_files(
print("-" * 60)
test_result = False

# Clean up database after exception to prevent contamination of next test
if args.flushall_on_every_test_end or args.flushall_on_every_test_start:
logging.warning("Exception caught - cleaning up database with FLUSHALL")
try:
for r in redis_conns:
r.flushall()
except Exception as e:
logging.error(f"FLUSHALL failed after exception: {e}")

# Check if user requested exit via Ctrl+C
if _exit_requested:
logging.info(
Expand Down
Loading