Commit fd54df1e authored by Rich Trott's avatar Rich Trott
Browse files

test: fix flaky test-fs-watch-recursive on OS X

The test was sometimes timing out due to a race condition. In OS X,
events for `fs.watch()` might only start showing up after a delay. This
is a limitation of the operating system. To work around that, there was
a timer in the test that delayed the writing of the file by 100ms.
However, sometimes that was not enough, and so the event never fired,
and the test timed out.

Change the timer to an interval so that it fires repeatedly until it is
picked up. This change only affects OS X.

Fixes: https://github.com/nodejs/node/issues/8511
PR-URL: https://github.com/nodejs/node/pull/9303


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarSantiago Gimeno <santiago.gimeno@gmail.com>
parent 2bd850b3
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