Repository navigation
Fix intermittently failing test - #1452
Merged
Merged
Conversation
Just noticed this test case was failing intermittently on: #1451 Problem: the test case scheduled a `setImmediate` callback that'd wait for 100 ms and exit the thread. After that handler returned, the test submitted a second task, expecting the thread to crash before accepting it, but it was possible for the second task's message to arrive and be proceed before the `setImmediate` callback ran. Replace the timing-dependent setup with a test handler that replaces the thread's message listener and exits immediately when the next task arrives, guaranteeing the reused thread dies before acknowledging it, and exercising the pool's retry path deterministically. A side benefit is that we kill the 100 ms busy wait.
Contributor
Author
|
Fixed |
brandur
added a commit
that referenced
this pull request
Oct 6, 2026
While fixing an intermittent build from for JS [1], I ran into a different intermittent build problem in JS. The CI job runs `pnpm audit,` and the JS ecosystem has so many vulnerabilities being discovered all the time that this will arbitrarily fail the build at any time. I've upgraded the vulnerable dependencies here, but I'm also pulling `pnpm audit` out of the build for now. It doesn't seem like a bad idea, but we need a way to do this that doesn't involve randomly failing unrelated builds. I assume Dependabot will get to those dependencies, but we've been having a heck of a problem with noise from that recently too, but we may need to find option three. [1] #1452
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.
Just noticed this test case was failing intermittently on:
#1451
Problem: the test case scheduled a
setImmediatecallback that'd waitfor 100 ms and exit the thread. After that handler returned, the test
submitted a second task, expecting the thread to crash before accepting
it, but it was possible for the second task's message to arrive and be
proceed before the
setImmediatecallback ran.Replace the timing-dependent setup with a test handler that replaces the
thread's message listener and exits immediately when the next task
arrives, guaranteeing the reused thread dies before acknowledging it,
and exercising the pool's retry path deterministically. A side benefit
is that we kill the 100 ms busy wait.