Commit 25a05e5d authored by Rich Trott's avatar Rich Trott Committed by James M Snell
Browse files

test: fix flaky test-fs-watchfile on macOS

On macOS, a watcher created with fs.watch() does not necessarily
start receiving events immediately. So it can miss a change by
fs.writefile() if it comes very soon after the watcher is created. Fix
test flakiness caused by this by using `setInterval()` to repeat the
write action.

PR-URL: https://github.com/nodejs/node/pull/13252
Fixes: https://github.com/nodejs/node/issues/13248


Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent ec357bf8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment