Skip to content

test: deflake test-bench-errors - #66153

Open
panva wants to merge 1 commit into
nodejs:mainfrom
panva:deflake-bench-errors
Open

panva wants to merge 1 commit into
nodejs:mainfrom
panva:deflake-bench-errors

Conversation

@panva

@panva panva commented Sep 20, 2026

Copy link
Copy Markdown
Member

The 10ms timeout can expire before the benchmark callback starts. There is then no unsettled work to abort the rest of the run.

Abort from inside the callback to guarantee pending work. Cover timeout errors separately with a zero timeout.

The 10ms timeout can expire before the benchmark callback starts.
There is then no unsettled work to abort the rest of the run.

Abort from inside the callback to guarantee pending work. Cover timeout
errors separately with a zero timeout.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
@panva panva added the flaky-test Issues and PRs involving tests that fail intermittently in CI. label Sep 20, 2026
@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 Sep 20, 2026
@panva

panva commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.29%. Comparing base (97af3d7) to head (050b8ba).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66153   +/-   ##
=======================================
  Coverage   90.29%   90.29%           
=======================================
  Files         790      790           
  Lines      272021   272021           
  Branches    51917    51930   +13     
=======================================
+ Hits       245611   245626   +15     
+ Misses      16903    16889   -14     
+ Partials     9507     9506    -1     

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

@panva

panva commented Sep 20, 2026

Copy link
Copy Markdown
Member Author

Locally, I forced the timing window with a beforeEach hook that blocks for 25ms using Atomics.wait() before the timeout benchmark.

That lets its 10ms deadline expire before the callback starts. There is then no unsettled work, so the following benchmark runs and its mustNotCall() produces ERR_ASSERTION instead of the expected ABORT_ERR like in:

The unmodified test failed with the reported assertion in 100/100 forced runs. With this fix 100/100 runs passed with the same delay applied.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@panva
panva requested a review from jasnell September 20, 2026 13:58
@panva panva added the fast-track PRs proposed for a shorter-than-standard waiting period before landing. label Sep 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @panva. Please 👍 to approve.

@panva panva added 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. labels Sep 20, 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. fast-track PRs proposed for a shorter-than-standard waiting period before landing. 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