From 7dcd6353cc787bf925fcef98021f498805c70cea Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 6 Oct 2026 10:07:47 +0530 Subject: [PATCH] test(cron): drop the dead RuntimeError hedge around tick() in the receipt test tick(sync=True) collects worker futures and logs "Cron job future failed" instead of re-raising, so the try/except RuntimeError around it could never fire and only hid a regression that made tick() start raising. Verified the test passes without it (fold finding 2). --- tests/cron/test_due_scan_save_failure.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/cron/test_due_scan_save_failure.py b/tests/cron/test_due_scan_save_failure.py index 3562c173fb..67a857803b 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