Skip to content

Conversation

@gurgunday
Copy link
Member

@gurgunday gurgunday commented Sep 27, 2025

It's flaky, and this should fix it

This test calls tmpdir.refresh(). In the parallel suite, another test could be using that directory at the same time, so refresh causes cross-test interference

Beyond tmpdir, fs.watch tests are sensitive to system load and timing - it already relies on timeouts

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Sep 27, 2025
@codecov
Copy link

codecov bot commented Sep 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.45%. Comparing base (cff138c) to head (9514cf1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60041      +/-   ##
==========================================
- Coverage   88.45%   88.45%   -0.01%     
==========================================
  Files         703      703              
  Lines      207546   207546              
  Branches    40016    40023       +7     
==========================================
- Hits       183595   183583      -12     
+ Misses      15956    15951       -5     
- Partials     7995     8012      +17     

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.

@lpinca
Copy link
Member

lpinca commented Sep 28, 2025

This test calls tmpdir.refresh(). In the parallel suite, another test could be using that directory at the same time, so refresh causes cross-test interference

This is not a valid reason. tmpdir.refresh() was designed for parallel execution.

Beyond tmpdir, fs.watch tests are sensitive to system load and timing - it already relies on timeouts

This is also not valid reason. There are other fs.watch tests like this (with timers) and they are not flaky. I did not investigate but it seems the issue is on macOS so it might be related to libuv/libuv#4503. See also https://github.com/nodejs/node/pull/54498/files.

cc: @pipobscure

@gurgunday
Copy link
Member Author

Closing, created #60051

@gurgunday gurgunday closed this Sep 28, 2025
@gurgunday gurgunday deleted the flaky-watch branch September 28, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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