Skip to content

Commit 955c150

Browse files
committed
test: reduce sequential/test-fs-watch flakiness
The fs.watch test's write events sometimes aren't produced on OS X, possibly because of a fsevents race condition. This patch gives delays the writing a total of 20ms, which makes the test pass consistently. PR-URL: #1275 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 36f017a commit 955c150

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/sequential/test-fs-watch.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ assert.doesNotThrow(
5656

5757
setTimeout(function() {
5858
fs.writeFileSync(filepathOne, 'world');
59-
}, 10);
59+
}, 20);
6060

6161

6262
process.chdir(testDir);
@@ -79,7 +79,7 @@ assert.doesNotThrow(
7979

8080
setTimeout(function() {
8181
fs.writeFileSync(filepathTwoAbs, 'pardner');
82-
}, 10);
82+
}, 20);
8383

8484
try { fs.unlinkSync(filepathThree); } catch (e) {}
8585
try { fs.mkdirSync(testsubdir, 0700); } catch (e) {}
@@ -103,7 +103,7 @@ assert.doesNotThrow(
103103
setTimeout(function() {
104104
var fd = fs.openSync(filepathThree, 'w');
105105
fs.closeSync(fd);
106-
}, 10);
106+
}, 20);
107107

108108
// https://github.com/joyent/node/issues/2293 - non-persistent watcher should
109109
// not block the event loop

0 commit comments

Comments
 (0)