fix(tests): replace timing-dependent synchronization#499
Merged
Conversation
receive_from selected between the target channel and a 1s timer, asserting the target fired. A real event arrives in milliseconds, but under a loaded host the async round-trip raced the 1s deadline and the timer won, failing with a channel identity mismatch — measured ~50% (3 of 6) flaky. The deadline only exists to stop a hang; give it 10s of headroom. Verified 10/10 clean afterwards.
wolfy-j
approved these changes
Jul 19, 2026
wolfy-j
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the complete test change. The timer is only a hang guard around an asynchronous registry-generation drain; increasing it from 1s to 10s does not change runtime behavior or assertions, and the test still fails deterministically on a real hang.
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.
Removes three independent timing races from the test suite:
Process.Close, provingunlistenreclaimed all live state instead of relying on 100-microsecond observations.WaitclosesStderrPipe, matching theos/execpipe contract and preventing buffered output loss.Validation
make lintgo test -race -count=20 ./runtime/lua/modules/process ./service/exec/native./tests/app/test— 402 application tests passed