Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cc3a705

Browse filesBrowse files
lpincaaduh95
authored andcommitted
test: deflake test-fs-promises-watch-iterator
Add a delay before writing the files to ensure that the watcher receives the notifications. Fixes: #60051 Refs: #52601 PR-URL: #60060 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
1 parent f6ff6e7 commit cc3a705
Copy full SHA for cc3a705

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-fs-promises-watch-iterator.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-promises-watch-iterator.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ class WatchTestCase {
3434
}
3535
}
3636
async writeFiles() {
37+
// Do the write with a delay to ensure that the OS is ready to notify us.
38+
await setTimeout(common.platformTimeout(100));
39+
3740
for (const fileName of [...this.files]) {
3841
await writeFile(this.filePath(fileName), Date.now() + fileName.repeat(1e4));
3942
}
40-
await setTimeout(common.platformTimeout(100));
4143
}
4244
}
4345

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.