Commit Graph

2 Commits

Author SHA1 Message Date
Rich Trott
6d60c93056 test: remove timer in fs.watchFile() test
The timer was there to address a race condition that has been removed
from the test. Remove it.

PR-URL: https://github.com/nodejs/node/pull/21694
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-13 18:39:03 -07:00
Rich Trott
8c305e1c2f test: fix flaky watchFile()
The regression that test-fs-watch-file-enoent-after-deletion was written
to test for involves whether or not the callback runs or not. Checking
what the file watcher reports unfortunately is subject to race
conditions on Windows (and possibly elsewhere) because the file watcher
returns control to the event loop before it may be receiving data from
the OS. So remove those assertions. The test still checks what it is
supposed to check, but is no longer subject to race conditions.

Fixes: https://github.com/nodejs/node/issues/21692

PR-URL: https://github.com/nodejs/node/pull/21694
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-07-13 18:38:52 -07:00