Permalink
Browse files

Change timings in the failing test.

Appears to be some kind of race condition within the test suite. This
is just an attempt at seeing whether it is fixed on travis.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information...
1 parent a43883d commit ee76fc3ba323d04300c95a6d2446ae945ad90df7 @ncb000gt ncb000gt committed Sep 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/test-cron.js
View
@@ -284,14 +284,14 @@ module.exports = testCase({
assert.notEqual(d.getHours(), t.getHours());
assert.ok(!(Date instanceof time.Date));
- if ((58 - t.getSeconds()) <= 0) {
+ if ((56 - t.getSeconds()) <= 0) {
setTimeout(testRun, (60000 - (t.getSeconds()*1000)) + 1000);
} else {
testRun();
}
function testRun() {
- var s = d.getSeconds()+1;
+ var s = d.getSeconds()+2;
d.setSeconds(s);
var c = new cron.CronJob(d, function() {
assert.ok(true);

0 comments on commit ee76fc3

Please sign in to comment.