Skip to content

Test midnight timezone jobs do not run on every poll - #664

Open
salapenar-max wants to merge 1 commit into
dbader:masterfrom
salapenar-max:test/midnight-timezone-polling
Open

salapenar-max wants to merge 1 commit into
dbader:masterfrom
salapenar-max:test/midnight-timezone-polling

Conversation

@salapenar-max

Copy link
Copy Markdown

Daily jobs just after midnight in Europe/Berlin or Europe/Amsterdam could run immediately at startup and then on every poll when the host timezone was UTC (#609). The existing timezone fixes released in 1.2.2 correct the tested scenario; this PR adds explicit regression coverage for the runaway execution behavior.

The test covers 12 combinations: midnight, 00:05, and 00:30; Berlin and Amsterdam; winter and summer offsets. It checks the exact next-run timestamp, no execution at startup, one execution across five consecutive polls, and another execution at the next day's scheduled time.

Validation on Linux/Python 3.13 with pytz 2026.5:

  • The new regression fails for all 12 combinations against the 1.2.1 source.
  • Current master: python -m pytest test_schedule.py -q — 82 passed, 12 subtests passed.
  • An independent clock-controlled reproduction against the PyPI packages reproduces repeated execution in 1.2.1 and passes in 1.2.2.
  • Formatting passes with the repository's pinned Black 20.8b1 (run on Windows/Python 3.11); git diff --check passes.

Related to #609. This does not establish that every report in that thread is resolved, including the report mentioning 1.2.2; the coverage is limited to the configurations above and does not exercise a DST transition.

AI disclosure: OpenAI Codex investigated the report, wrote the regression test, and executed the checks on behalf of the submitting account owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants