Skip to content

test: deflake test-filehandle-close - #66750

Open
panva wants to merge 1 commit into
nodejs:mainfrom
panva:reliability-deflake-2026-10-15
Open

panva wants to merge 1 commit into
nodejs:mainfrom
panva:reliability-deflake-2026-10-15

Conversation

@panva

@panva panva commented Oct 15, 2026

Copy link
Copy Markdown
Member

An fd released with closeSync() can be reused by background I/O before FileHandle.close() runs in the thread pool, so closing it can succeed. Construct the handle around a high invalid fd to keep the native EBADF rejection path deterministic.

Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-10-15.md

Assisted-by: Codex

An fd released with closeSync() can be reused by background I/O before
FileHandle.close() runs in the thread pool, so closing it can succeed.
Construct the handle around a high invalid fd to keep the native EBADF
rejection path deterministic.

Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-10-15.md
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
@panva panva added flaky-test Issues and PRs involving tests that fail intermittently in CI. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Oct 15, 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 Oct 15, 2026

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Switching to internal API is not very satisfying, but I guess the test still does its job of validating the error shape

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

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.49%. Comparing base (12ce819) to head (67b7a95).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #66750   +/-   ##
=======================================
  Coverage   90.48%   90.49%           
=======================================
  Files         797      797           
  Lines      277491   277491           
  Branches    53318    53332   +14     
=======================================
+ Hits       251091   251116   +25     
+ Misses      16793    16782   -11     
+ Partials     9607     9593   -14     

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

@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 15, 2026

@gurgunday gurgunday 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.

Lgtm

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.

6 participants