Skip to content
Browse files

test: move timer-dependent test to sequential

`test-regress-GH-897` is dependent on a timer firing within a period of
time. Especially on some of the FreeBSD hosts on CI, we have seen tests
like that fail when run in parallel. (This may have nothing to do with
FreeBSD and may just mean that the hosts are resource-constrained.) Move
this test to sequential as we have done with several other
timer-dependent tests recently.

The test has also been refactored and documented via comments.

PR-URL: #9487
Reviewed-By: Colin Ihrig <>
Reviewed-By: Santiago Gimeno <>
Reviewed-By: Minwoo Jung <>
  • Loading branch information
Trott committed Nov 10, 2016
1 parent 1323db0 commit 1ce05ad5401447cff6df6e62e22ff5cf052e5c92
Showing with 17 additions and 15 deletions.
  1. +0 −15 test/parallel/test-regress-GH-897.js
  2. +17 −0 test/sequential/test-regress-GH-897.js

This file was deleted.

@@ -0,0 +1,17 @@
'use strict';

// Test for bug where a timer duration greater than 0 ms but less than 1 ms
// resulted in the duration being set for 1000 ms. The expected behavior is
// that the timeout would be set for 1 ms, and thus fire more-or-less
// immediately.
// Ref:

const common = require('../common');
const assert = require('assert');

const t =;
setTimeout(common.mustCall(function() {
const diff = - t;
assert.ok(diff < 100, `timer fired after ${diff} ms`);
}), 0.1);

0 comments on commit 1ce05ad

Please sign in to comment.