Skip to content

testquality: a test that sleeps a second or more is flagged - #68

Merged
aledbf merged 2 commits into
mainfrom
testquality/waits-2
Oct 25, 2026
Merged

aledbf merged 2 commits into
mainfrom
testquality/waits-2

Conversation

@aledbf

@aledbf aledbf commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Replaces #66, whose branch fell behind main while its gate ran (the rebase merge wants the branch at main's head). Same two commits.

A time.Sleep of a constant second or more in a test's body, closures included, is reported as TestX sleeps 5s for nothing it can see: a wait on the clock passes on a quiet machine and fails on a loaded one, which is what a flake is. A sleep inside a loop looks again (a wait for a condition with the loop's own bound) and is not flagged; nor is one under a second, a computed duration, or a helper's. The allowlist ratchet is the existing one (package:Test # why).

On spin: 26 findings in 24 tests; spin's PR carries them with each test's own reason. Fixture waits; docs and README. Lint, test, mutate 0 survivors, site.

🤖 Generated with Claude Code

aledbf and others added 2 commits October 25, 2026 15:18
A wait on the clock passes on a quiet machine and fails on a loaded one,
which is what a flake is: of 45 failed fleet gates in two days of spin,
the real flakes were each a bound the machine's load outran. A
time.Sleep of a constant second or more in a test's body - a subtest's
or a goroutine's included - is reported with its length; under a second
paces a loop, a computed duration is not a number to judge, and a
helper's sleep is the helper's. The allowlist carries the ones whose only
signal is the clock, each with its why.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…the clock

Nine of spin's 43 were a loop's pacing: for deadline...; time.Sleep(2s).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@aledbf
aledbf merged commit e6af029 into main Oct 25, 2026
3 checks passed
@aledbf
aledbf deleted the testquality/waits-2 branch October 25, 2026 18:22
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