test(cron): say which failure's notice the yield case releases

The comment claimed the notice goes out immediately. In production
will_retry runs before mark_job_run, so the first failure (5m rung beats
the 10m run) is held; only the attempt-1 failure asserted here yields.
This commit is contained in:
kshitijk4poor
2026-09-26 20:01:41 +05:30
committed by kshitij
parent fecaf3afae
commit cb399b56d9

View File

@@ -97,7 +97,8 @@ def test_will_retry_mirrors_plan_retry_yield(tmp_cron_home):
jm = get_job(mid["id"])
assert jm is not None
# 10m cadence beats the 15m and 30m rungs: the ladder can never climb past attempt 1,
# so the exhaustion escape is unreachable and the notice must go out immediately.
# so the exhaustion escape is unreachable. At attempt 1 the next (15m) rung loses to the
# 10m run, so this failure's notice goes out rather than being held for a retry.
assert jm[ur.STATE_KEY]["attempt"] == 1
assert ur.will_retry(jm) is False, "10m cadence beats the 15m rung: yielded, notice goes out"