Skip to content

test: deflake test-process-timeout-blocked - #67481

Open
christianaurichzm wants to merge 1 commit into
nodejs:mainfrom
christianaurichzm:deflake-process-timeout-blocked
Open

christianaurichzm wants to merge 1 commit into
nodejs:mainfrom
christianaurichzm:deflake-process-timeout-blocked

Conversation

@christianaurichzm

Copy link
Copy Markdown
Member

test-process-timeout-blocked fails intermittently on the Windows 11 arm64 machines when, in the throw/reject cases, the 1000 ms deadline expires while the main thread is still formatting the uncaught error. The main thread then handles the timeout itself, so the expected message is not printed.

The fixtures that exit create their ready file in an 'exit' listener, which runs before the error is formatted, so the test did not retry. The main thread cannot handle the timeout once the process is exiting, so the test now retries when it did, and those fixtures no longer create the file. The assertions are unchanged.

With the first timeout lowered to 56-90 ms, where that formatting happens on x64, main fails 8/490 runs, all with the CI output, and this change 0/490. Unmodified, the test passes 300/300 with tools/test.py -j12 --repeat=300.

Refs: nodejs/reliability#1724

The fixtures that exit while a Worker is blocked created their file in
an 'exit' listener, before the process actually starts exiting, e.g.
while an uncaught error is still being formatted. If the deadline
expired in between, the main thread handled the timeout and the test
failed instead of retrying. The main thread cannot do that once it is
exiting, so retry when it did, and drop the 'exit' listeners.

Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Nov 15, 2026
@christianaurichzm christianaurichzm added the flaky-test Issues and PRs involving tests that fail intermittently in CI. label Nov 15, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky-test Issues and PRs involving tests that fail intermittently in CI. needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants