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

This commit is contained in:
Teknium
2026-08-14 21:05:06 -07:00
parent 0ea79484d2
commit 2b5a3fb8ac
+4 -2
View File
@@ -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(), (