Skip to content

test: the periodic test no longer fails across the top of an hour - #43

Merged
giraffesyo merged 1 commit into
canaryfrom
test/periodic-hour-boundary
Oct 2, 2026
Merged

giraffesyo merged 1 commit into
canaryfrom
test/periodic-hour-boundary

Conversation

@giraffesyo

Copy link
Copy Markdown
Member

Summary

TestPeriodicJobsRunOnceAcrossLeaders failed the canary CI run of #42 on Postgres 17 (RunOnStart jobs = 2, want 1). It fails whenever it runs across the top of an hour; no library code changes.

The test checks that RunOnStart inserts one job, using a periodic job on Every(time.Hour). An hourly schedule also has a regular slot at the top of each hour, and the failing package run ended at 02:00:04 UTC after 30 seconds, so the test was running at 02:00:00 and the regular slot inserted a second job. Both jobs were correct.

The job now uses a schedule with no slots, so RunOnStart is the only thing that can insert it.

Testing

  • go test -race -count=3 -run TestPeriodicJobsRunOnceAcrossLeaders . passes against Postgres 17.
  • golangci-lint: 0 issues.
  • Not reproduced on demand, since that needs the clock at the top of an hour; the diagnosis rests on the failure's timestamp. No other test starts a client with a schedule that depends on the time of day.

Only a test changed, so no hopperbench results.

Checklist

  • make check passes — lint and the changed test run locally; the full suite runs in CI here
  • No cryptography was added (tests run with GODEBUG=fips140=only)
  • New or changed SQL in the claim, finalize, rescue or leader paths has a concurrency or chaos test — no SQL changed
  • Behavior changes are reflected in docs/PLAN.md — none

@giraffesyo
giraffesyo merged commit da6eded into canary Oct 2, 2026
9 checks passed
@giraffesyo
giraffesyo deleted the test/periodic-hour-boundary branch October 2, 2026 02:15
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.

1 participant