Skip to content

test: deflake test-process-timeout-worker-stacks - #67783

Open
inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:test-deflake-process-timeout-worker-stacks
Open

inoway46 wants to merge 1 commit into
nodejs:mainfrom
inoway46:test-deflake-process-timeout-worker-stacks

Conversation

@inoway46

Copy link
Copy Markdown
Contributor

The test hard-coded thread ids, but the idle Worker could create its nested Worker before the main thread created its last Worker, swapping their ids. This creates idle last so the ids are fixed.

Before the fix, it failed 9/300 on macOS (300/300 with an injected delay). After the fix, it passed 300/300 in every case: https://github.com/inoway46/node/actions/runs/45648605932

Failed runs: 1, 2, 3

Refs: #67712

The test expected fixed thread ids, but a thread id is allocated when
a Worker is constructed. The `idle` Worker could construct its `nested`
Worker before the main thread constructed its third Worker, so the two
swapped ids.

Create the Worker that creates another Worker last, so that all ids
are allocated in a fixed order.

Refs: nodejs#67712
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: Claude Code
@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 26, 2026
@inoway46 inoway46 added the flaky-test Issues and PRs involving tests that fail intermittently in CI. label Nov 26, 2026
@inoway46
inoway46 marked this pull request as ready for review November 26, 2026 04:44
@codecov

codecov Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.49%. Comparing base (0623b0d) to head (05cac65).
⚠️ Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67783      +/-   ##
==========================================
- Coverage   90.50%   90.49%   -0.02%     
==========================================
  Files         805      805              
  Lines      285778   285806      +28     
  Branches    55174    55176       +2     
==========================================
- Hits       258654   258631      -23     
- Misses      17217    17263      +46     
- Partials     9907     9912       +5     

see 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 26, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 26, 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