Skip to content

The agent that grows with you

test(cron): drop the dead RuntimeError hedge around tick() in the receipt test

kshitijk4poor7dcd6353cc78
diff --git a/tests/cron/test_due_scan_save_failure.py b/tests/cron/test_due_scan_save_failure.py
index 3562c173fbb..67a857803b7 100644
--- a/tests/cron/test_due_scan_save_failure.py
+++ b/tests/cron/test_due_scan_save_failure.py
@@ -142,10 +142,7 @@ def test_dispatch_failure_after_receipt_never_leaves_it_claimed(cron_store, monk
monkeypatch.setattr(scheduler, "run_one_job", lambda job, **k: True)
monkeypatch.setattr(scheduler, "_should_yield_tick_to_fresh_gateway", lambda: None)
monkeypatch.setattr(scheduler, site, boom)
- try:
- scheduler.tick(verbose=False, sync=True)
- except RuntimeError:
- pass # a claim failure may still surface; the receipt is what must be terminal
+ scheduler.tick(verbose=False, sync=True) # a worker failure is logged, never raised
row = executions.latest_execution("due-job")
assert row is not None and row["status"] == "failed"
if site == "note_cron_execution": # the receipt exists, so creation did not fail