Skip to content

Fix intermittently failing test - #1452

Merged
brandur merged 1 commit into
masterfrom
brandur-fix-intermittent-js-test
Oct 6, 2026
Merged

brandur merged 1 commit into
masterfrom
brandur-fix-intermittent-js-test

Conversation

@brandur

@brandur brandur commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@brandur

brandur commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Fixed pnpm audit problems here:
#1453

@brandur
brandur merged commit d2e52e4 into master Oct 6, 2026
29 of 30 checks passed
@brandur
brandur deleted the brandur-fix-intermittent-js-test branch October 6, 2026 04:32
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
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