test(cron): add coverage for pre-set stop event - #67135
Conversation
Related: this adds the pre-set |
|
Thanks for adding the focused lifecycle coverage. Current main dispatches This is an automated hermes-sweeper review. |
SummaryNine open PRs are associated with this complex: #44049, #44050, #46207, #47358, #52259, and #67418 address the Desktop-versus-Gateway cron race, while #67135, #67198, and #67204 add scheduler-provider tests without changing scheduler ownership. The fix diffs range from obsolete direct-ticker guards and startup suppression to provider-aware runtime-lock deferral; the recorded cross-issue best-fix selection is #44050, although every PR header records verify_verdikt=n/a. Related pull requests
Duplicates#44049 and #44050 implement substantially the same runtime-lock-backed scheduler deferral; #46207 and #47358 are obsolete direct-ticker variants, while the ownership portions of #52259 and #67418 address the same race through broader lifecycle, timeout, or status-probe changes. #67135, #67198, and #67204 are complementary test PRs, not ownership-fix duplicates. Suggested consolidationAuthor action: rebase #44050 onto current main while preserving its built-in-only provider integration and regression coverage; this retains the recorded best-fix target without making a merge recommendation. Then close #44049, #46207, and #47358 as duplicates of #44050, and split the standalone-send timeout from #52259 and independently justified status/profile hardening from #67418 before closing their remaining ownership portions as duplicates; despite the keep_open reviews on #46207, #47358, #52259, and #67418, the first two target the obsolete direct-ticker path and the latter two contain distinct salvageable work around an overlapping ownership fix. Keep #67135 and #67198 open for their complementary scheduler-test coverage, and keep #67204 open after the review-requested comment correction. Cross-PR triage: Reviewed 9 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 114 kB of PR diffs, 42 kB of issue/PR text, 15 kB of discussion (22 comments), 25 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
Adds a unit test covering the edge case where the in-process cron scheduler is started with an already-set stop event.
The test verifies that the scheduler exits cleanly without continuing background work when shutdown has already been requested. This improves test coverage around the scheduler lifecycle without modifying production code.
Related to #67102
✅ Tests (adding or improving test coverage)
Added a new unit test in
tests/cron/test_scheduler_provider.py.Covered the scenario where
InProcessCronSchedulerstarts with the stop event already set.No production code was modified.