test: deflake test-fs-promises-watch-iterator#60060
test: deflake test-fs-promises-watch-iterator#60060nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
| for (const fileName of [...this.files]) { | ||
| await writeFile(this.filePath(fileName), Date.now() + fileName.repeat(1e4)); | ||
| } | ||
| await setTimeout(common.platformTimeout(100)); |
There was a problem hiding this comment.
If there was a reason for this I will add it back, but I don't see it.
| // Do the write with a delay to ensure that the OS is ready to notify us. | ||
| await setTimeout(common.platformTimeout(100)); |
There was a problem hiding this comment.
The same is done in other fs.watch() tests, for example:
node/test/parallel/test-fs-watch-recursive-add-file.js
Lines 41 to 44 in c6316f9
There was a problem hiding this comment.
I think this deserves a TODO to investigate why this is occuring and whether or not this is a bug.
There was a problem hiding this comment.
There already an open issue (#52601) linked in the commit message.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60060 +/- ##
==========================================
- Coverage 88.45% 88.45% -0.01%
==========================================
Files 703 703
Lines 207826 207826
Branches 40030 40038 +8
==========================================
- Hits 183842 183826 -16
+ Misses 15973 15972 -1
- Partials 8011 8028 +17 🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Add a delay before writing the files to ensure that the watcher receives the notifications. Fixes: nodejs#60051 Refs: nodejs#52601
d3b5d31 to
dfdbb39
Compare
|
Rebased, this needs new approvals. |
This comment was marked as outdated.
This comment was marked as outdated.
|
Landed in f8a43f6 |
Refs: nodejs#60060 PR-URL: nodejs#61532 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Add a delay before writing the files to ensure that the watcher receives the notifications.
Fixes: #60051
Refs: #52601