diff --git a/test/nodes/core/core/89-delay_spec.js b/test/nodes/core/core/89-delay_spec.js index 318a6a97a..b920d285b 100644 --- a/test/nodes/core/core/89-delay_spec.js +++ b/test/nodes/core/core/89-delay_spec.js @@ -463,16 +463,16 @@ describe('delay Node', function() { try { if (msg.topic === "_none_") { msg.payload.should.equal(2); - (Date.now() - t).should.be.approximately(500,50); + (Date.now() - t).should.be.approximately(500,200); } else if (msg.topic === "A") { msg.payload.should.equal(4); - (Date.now() - t).should.be.approximately(750,50); + (Date.now() - t).should.be.approximately(750,200); } else { msg.topic.should.equal("B"); msg.payload.should.equal(1); - (Date.now() - t).should.be.approximately(1000,50); + (Date.now() - t).should.be.approximately(1000,200); done(); } } catch(e) { @@ -506,16 +506,16 @@ describe('delay Node', function() { try { if (msg.topic === "_none_") { msg.payload.should.equal(2); - (Date.now() - t).should.be.approximately(500,50); + (Date.now() - t).should.be.approximately(500,200); } else if (msg.topic === "A") { msg.payload.should.equal(4); - (Date.now() - t).should.be.approximately(500,50); + (Date.now() - t).should.be.approximately(500,200); } else { msg.topic.should.equal("B"); msg.payload.should.equal(1); - (Date.now() - t).should.be.approximately(500,50); + (Date.now() - t).should.be.approximately(500,200); done(); } } catch(e) { diff --git a/test/nodes/core/core/89-trigger_spec.js b/test/nodes/core/core/89-trigger_spec.js index dddf1593b..2f5aee68b 100644 --- a/test/nodes/core/core/89-trigger_spec.js +++ b/test/nodes/core/core/89-trigger_spec.js @@ -415,7 +415,7 @@ describe('trigger node', function() { n1.emit("input", {reset:true}); // reset },90); setTimeout( function() { - c.should.equalOneOf(3,4); // should send foo 3 or 4 times. + c.should.within(2,5); // should send foo between 2 and 5 times. done(); },180); }); diff --git a/test/red/runtime/storage/localfilesystem_spec.js b/test/red/runtime/storage/localfilesystem_spec.js index 05e8fe10e..4eff5224e 100644 --- a/test/red/runtime/storage/localfilesystem_spec.js +++ b/test/red/runtime/storage/localfilesystem_spec.js @@ -134,12 +134,14 @@ describe('LocalFileSystem', function() { fs.existsSync(flowFileBackupPath).should.be.false(); fs.writeFileSync(flowFileBackupPath,JSON.stringify(testFlow)); fs.existsSync(flowFileBackupPath).should.be.true(); - localfilesystem.getFlows().then(function(flows) { - flows.should.eql(testFlow); - done(); - }).otherwise(function(err) { - done(err); - }); + setTimeout(function() { + localfilesystem.getFlows().then(function(flows) { + flows.should.eql(testFlow); + done(); + }).otherwise(function(err) { + done(err); + }); + },50); }).otherwise(function(err) { done(err); });