Browse Source

test: speed up simple/test-fs-watch

Don't wait a full second before starting the watcher, 10 ms ought to be
more than enough time.  Reduces running time from 1250 ms to 250 ms on
my system.
v0.11.7-release
Ben Noordhuis 12 years ago
parent
commit
c5ed96a4b1
  1. 6
      test/simple/test-fs-watch.js

6
test/simple/test-fs-watch.js

@ -77,7 +77,7 @@ assert.doesNotThrow(
setTimeout(function() {
fs.writeFileSync(filepathOne, 'world');
}, 1000);
}, 10);
process.chdir(testDir);
@ -100,7 +100,7 @@ assert.doesNotThrow(
setTimeout(function() {
fs.writeFileSync(filepathTwoAbs, 'pardner');
}, 1000);
}, 10);
try { fs.unlinkSync(filepathThree); } catch (e) {}
try { fs.mkdirSync(testsubdir, 0700); } catch (e) {}
@ -124,7 +124,7 @@ assert.doesNotThrow(
setTimeout(function() {
var fd = fs.openSync(filepathThree, 'w');
fs.closeSync(fd);
}, 1000);
}, 10);
// https://github.com/joyent/node/issues/2293 - non-persistent watcher should
// not block the event loop

Loading…
Cancel
Save