Skip to content

test: deflake async-hooks statwatcher test#63396

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:flaky-test-statwatcher
Open

test: deflake async-hooks statwatcher test#63396
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:flaky-test-statwatcher

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 18, 2026

This updates async-hooks/test-statwatcher to wait until fs.watchFile()
has observed the initial missing-file state before writing the watched files.

Without that ordering, uv_fs_poll can race with the test write and use the
newly created file as its initial baseline. In that case no later change is
emitted, so the test can hang until the harness timeout.

Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-15.md#jstest-failure


Assisted-by: openai:gpt-5.5

Wait for the initial missing-file poll before writing watched files.
Otherwise uv_fs_poll can observe the created file as its baseline and
never emit the expected change event.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@nodejs-github-bot nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels May 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (1f371fc) to head (d9a22ad).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #63396   +/-   ##
=======================================
  Coverage   90.05%   90.05%           
=======================================
  Files         714      714           
  Lines      225704   225704           
  Branches    42714    42714           
=======================================
+ Hits       203250   203269   +19     
+ Misses      14225    14218    -7     
+ Partials     8229     8217   -12     

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

@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label May 18, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 18, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@trivikr trivikr added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label May 18, 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

async_hooks Issues and PRs related to the async hooks subsystem. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants