Skip to content

fix: Make TestChunksIntervalSeconds less flaky#3850

Merged
DrJosh9000 merged 1 commit intomainfrom
fix-TestChunksIntervalSeconds-flake
Apr 22, 2026
Merged

fix: Make TestChunksIntervalSeconds less flaky#3850
DrJosh9000 merged 1 commit intomainfrom
fix-TestChunksIntervalSeconds-flake

Conversation

@DrJosh9000
Copy link
Copy Markdown
Contributor

Description

Fix a flaky test.

Context

https://buildkite.com/organizations/buildkite/analytics/suites/buildkite-agent/tests/8503693e-4ff1-8a30-9887-f177a8175585?query=TestChunksIntervalSeconds

Changes

Check for a range of possible values, and update the comments.

A few other flourishes while I'm here:

  • Split the one subtest into two. Instead of a wait group, use t.Run twice with t.Parallel. Because the two values are not actually compared against each other, even though that's what the old subtest name implies.
  • Use an atomic - this isn't addressing any problem, a mutex is fine. It just feels more right.

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go tool gofumpt -extra -w .)

Disclosures / Credits

Spite and keyboards.

@DrJosh9000 DrJosh9000 requested review from a team as code owners April 21, 2026 05:24
@DrJosh9000 DrJosh9000 force-pushed the fix-TestChunksIntervalSeconds-flake branch from e0f37a2 to f3f8117 Compare April 21, 2026 05:25
@DrJosh9000 DrJosh9000 enabled auto-merge April 21, 2026 06:24
@DrJosh9000 DrJosh9000 merged commit 87f2b91 into main Apr 22, 2026
3 checks passed
@DrJosh9000 DrJosh9000 deleted the fix-TestChunksIntervalSeconds-flake branch April 22, 2026 00:29
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