Repository navigation
Auto-close test: stop two cases racing their own timers on a slow runner - #321
Closed
shakibbinkabir wants to merge 1 commit into
Closed
shakibbinkabir wants to merge 1 commit into
shakibbinkabir wants to merge 1 commit into
Conversation
Two cases sleep for a fixed time and then assert that a pending timer has not fired yet, with 150 ms and 100 ms to spare. On a busy macOS runner the sleep runs long, the timer fires first and the precondition traps: line 27 on the windows-catch-up PR, line 54 on mochi-colours, neither of which touches the state machine. Both timers are now a full second out, so the sleeps only have to outlast what they are there to outlast. The test takes about 1.6 s longer. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Folded into #365 as its first commit ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"Test auto-close timing" fails now and then on PRs that do not touch the state machine: at line 27 on
windows-catch-up(#307) and at line 54 onmochi-colours(#320). That is 2 of the last 17 finishedBuildruns.Cause
Two cases sleep for a fixed time and then assert that a pending timer has not fired yet:
When the runner stalls for longer than the slack, the timer fires first and the precondition traps.
Fix
Both timers are now a full second out, and the two
waitForCompactcalls that follow get 3 s instead of 1 s. What each case checks is unchanged: the old 50 ms timer must not close the island, and the 10 ms auto-close preference must not cut the greeting short. Only the test file changes, and it takes about 1.6 s longer.Measurements
On a
macos-latestrunner on my fork, both versions compiled the wayscripts/test-auto-close.shdoes:SIGSTOP/SIGCONT), 30 runsPlain CPU load did not reproduce it; freezing the process did, at the same two lines CI failed on. The freeze is my model of a stalled runner, not something I observed on the failing runs.
🤖 Generated with Claude Code