Skip to content

test: deflake test-util-throttle - #67982

Open
christianaurichzm wants to merge 1 commit into
nodejs:mainfrom
christianaurichzm:deflake-util-throttle
Open

christianaurichzm wants to merge 1 commit into
nodejs:mainfrom
christianaurichzm:deflake-util-throttle

Conversation

@christianaurichzm

Copy link
Copy Markdown
Member

parallel/test-util-throttle fails at line 274 with 0 !== 1 on 2 PRs in the latest reliability report.

The block from #66839 expects the second call to a 10 ms throttle to be queued. Each call updates the libuv clock, so if the process is descheduled for 10 ms between them, the second call runs immediately, without the abort listener. The block now lives in test-util-throttle-timing.js, where #66034 put the other timing checks.

With a 20 ms Atomics.wait() between the calls, it fails 10/10 before this change and 0/10 after.

Refs: nodejs/reliability#1742

The abort listener check expects the second call to a throttle with a
10 ms window to be queued. If the process is descheduled for 10 ms
between the two calls, the window has already expired and the second
one runs right away without adding the listener. Move the check to
test-util-throttle-timing.js, where the timers and the libuv clock are
mocked.

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 Dec 3, 2026
@christianaurichzm christianaurichzm added the flaky-test Issues and PRs involving tests that fail intermittently in CI. label Dec 3, 2026
@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.58%. Comparing base (9873287) to head (876e86c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67982      +/-   ##
==========================================
+ Coverage   90.56%   90.58%   +0.01%     
==========================================
  Files         802      802              
  Lines      286935   286935              
  Branches    55415    55410       -5     
==========================================
+ Hits       259871   259916      +45     
+ Misses      17161    17100      -61     
- Partials     9903     9919      +16     

see 33 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 Dec 3, 2026
@panva panva added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Dec 3, 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 Dec 3, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@christianaurichzm christianaurichzm added the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 3, 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.

4 participants