Skip to content

Commit

Permalink
Increase test delays on Travis
Browse files Browse the repository at this point in the history
attempting to cut down on sporadic false negatives caused by flaky VM
filesystems
  • Loading branch information
es128 committed Apr 21, 2015
1 parent 74cc53f commit 4014925
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test.js
Expand Up @@ -18,6 +18,8 @@ var fixturesPath = getFixturePath('');

var watcher, watcher2;

var travisDelay = process.env.TRAVIS ? 200 : 0;

before(function() {
try { fs.mkdirSync(fixturesPath, 0x1ed); } catch(err) {}
});
Expand Down Expand Up @@ -53,7 +55,7 @@ after(function() {


describe('chokidar', function() {
this.timeout(3000);
this.timeout(4000);
it('should expose public API methods', function() {
chokidar.FSWatcher.should.be.a('function');
chokidar.watch.should.be.a('function');
Expand Down Expand Up @@ -92,9 +94,9 @@ function runTests(options) {
}
function d(fn, quicker, forceTimeout) {
if (options.usePolling || forceTimeout) {
return setTimeout.bind(null, fn, quicker ? 300 : 900);
return setTimeout.bind(null, fn, (quicker ? 300 : 900) + travisDelay);
} else {
return setTimeout.bind(null, fn, 25);
return setTimeout.bind(null, fn, 25 + travisDelay);
}
}
function dd(fn, slower) {
Expand Down

0 comments on commit 4014925

Please sign in to comment.