Skip to content

The agent that grows with you

test(cron): expect tick to contain create_execution failure per-job

Teknium2b5a3fb8ac92
diff --git a/tests/cron/test_recurring_wedge_selfheal.py b/tests/cron/test_recurring_wedge_selfheal.py
index 406df99c84e..fd0d6ababd7 100644
--- a/tests/cron/test_recurring_wedge_selfheal.py
+++ b/tests/cron/test_recurring_wedge_selfheal.py
@@ -186,8 +186,10 @@ class TestEAGAINCreateExecutionLeak:
monkeypatch.setattr(S, "create_execution", boom)
with mock.patch("cron.jobs.load_jobs", return_value=[job]):
- with pytest.raises(OSError):
- S.tick(verbose=False, sync=True)
+ # The failure is contained per-job (#86482 follow-up): the tick
+ # logs an ERROR, skips this fire, and moves on to the remaining
+ # due jobs instead of aborting the whole dispatch loop.
+ S.tick(verbose=False, sync=True)
# The claim must be released (not leaked) so the NEXT tick can retry.
assert job_id not in S.get_running_job_ids(), (