Make serve_stale refresh test deterministic #172

Merged
benvin merged 1 commits from benvin/stale-test-deterministic into master 2026-10-25 20:22:09 +11:00
Member

TestServeStaleMemberDoesNotBlockMerge reads the fetch counter right after the merges return, but the counted fetch runs inside the background refresh goroutine, so a slow schedule sees 1 instead of 2.

  • signal from the stub fetch when the background refresh starts
  • wait on that signal (5s timeout) before checking the fetch count
  • raise the refresh-reaches-merge deadline to 5s
TestServeStaleMemberDoesNotBlockMerge reads the fetch counter right after the merges return, but the counted fetch runs inside the background refresh goroutine, so a slow schedule sees 1 instead of 2. - signal from the stub fetch when the background refresh starts - wait on that signal (5s timeout) before checking the fetch count - raise the refresh-reaches-merge deadline to 5s
unkin-agent added 1 commit 2026-10-25 19:08:41 +11:00
Wait for the stale refresh before counting member fetches
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2dadb2d460
Author
Member

No findings.

No findings.
benvin merged commit a75aef8ded into master 2026-10-25 20:22:09 +11:00
benvin deleted branch benvin/stale-test-deterministic 2026-10-25 20:22:09 +11:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#172