Skip to content

test: reduce flakiness of test-worker-memory - #67513

Open
aduh95 wants to merge 1 commit into
nodejs:mainfrom
aduh95:unflake-test-worker-memory
Open

aduh95 wants to merge 1 commit into
nodejs:mainfrom
aduh95:unflake-test-worker-memory

Conversation

@aduh95

@aduh95 aduh95 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Before this change:

$ ./tools/test.py --repeat 999 test/parallel/test-worker-memory.js
[00:44|% 100|+ 169|- 830]: Done

After this change:

$ ./tools/test.py --repeat 999 test/parallel/test-worker-memory.js
[00:37|% 100|+ 999|-   0]: Done        

FWIW my machine has os.availableParallelism() === 18

Signed-off-by: Antoine du Hamel <duhamelantoine1995@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 16, 2026

@sxa sxa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hapy to approve but for reference do you know if this failure was specific to any particular platform?

@aduh95

aduh95 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor Author

I've asked a coding agent:

Your numbers: start 21.4 MB, end 132 MB, so about 6.2 MB for each worker running at the same time, and a ratio of 6.2. With a start that small, a limit of 5× allows only about 17 workers running at the same time. Upstream added the cap of 20 (f96a660) back when the starting RSS was bigger.

If the clanker were correct, that would be any platform that has os.availableParallelism() > 17 – assuming RSS size is similar on all platforms.
But in practice, I've tried capping at 15 and 12 (also divisors of 60) and still saw some flakiness (0.2% failure-rate for 12, 35.6% for 15, although still much better than the 83% for 18).

@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Nov 16, 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 16, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@panva panva added the flaky-test Issues and PRs involving tests that fail intermittently in CI. label Nov 16, 2026
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.68%. Comparing base (ab476ec) to head (a003fb0).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67513      +/-   ##
==========================================
- Coverage   90.68%   90.68%   -0.01%     
==========================================
  Files         799      799              
  Lines      280246   280244       -2     
  Branches    54113    54120       +7     
==========================================
- Hits       254150   254132      -18     
- Misses      16234    16265      +31     
+ Partials     9862     9847      -15     

see 39 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.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. 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.

5 participants