Make repodata coalescing tests deterministic #177

Merged
benvin merged 2 commits from benvin/repodata-cache-test-deterministic into master 2026-10-25 22:51:06 +11:00
Member

The repodata coalescing tests released the gated build after a fixed 50ms sleep, so a goroutine stalled past that window under -race could miss the in-flight singleflight call, trigger a second build and flake the test.

  • add sfWaiters, counting goroutines parked in singleflight Do via runtime.Stack
  • release the gate only once every follower is parked on the in-flight call
  • drop the trailing sleep from waitFor
The repodata coalescing tests released the gated build after a fixed 50ms sleep, so a goroutine stalled past that window under -race could miss the in-flight singleflight call, trigger a second build and flake the test. - add sfWaiters, counting goroutines parked in singleflight Do via runtime.Stack - release the gate only once every follower is parked on the in-flight call - drop the trailing sleep from waitFor
unkin-agent added 1 commit 2026-10-25 20:27:17 +11:00
Gate repodata coalescing tests on singleflight waiters
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline failed
809654920f
unkin-agent added 1 commit 2026-10-25 20:41:44 +11:00
Retrigger CI
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
dd7c90d1a1
Author
Member

No findings.

No findings.
benvin merged commit e4833b6f96 into master 2026-10-25 22:51:06 +11:00
benvin deleted branch benvin/repodata-cache-test-deterministic 2026-10-25 22:51:06 +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#177