Skip to content

Commit

Permalink
test: move timer-dependent test to sequential
Browse files Browse the repository at this point in the history
Timer-dependent tests fail frequently on certain platforms in CI when
run in parallel with other tests, likely due to competition for
resources. Move test-repl-timeout-throw to sequential to avoid this
problem. Also did some minor refactoring (var->const and more use of
assert.strictEqual of looser assertions).

PR-URL: #9431
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu>
  • Loading branch information
Trott authored and Myles Borins committed Nov 22, 2016
1 parent 5e820ae commit 2c75886
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';
var assert = require('assert');
var common = require('../common');
const common = require('../common');
const assert = require('assert');

var spawn = require('child_process').spawn;
const spawn = require('child_process').spawn;

var child = spawn(process.execPath, [ '-i' ], {
const child = spawn(process.execPath, [ '-i' ], {
stdio: [null, null, 2]
});

Expand Down Expand Up @@ -52,8 +52,8 @@ child.stdout.once('data', function() {
});

child.on('close', function(c) {
assert(!c);
assert.strictEqual(c, 0);
// make sure we got 3 throws, in the end.
var lastLine = stdout.trim().split(/\r?\n/).pop();
assert.equal(lastLine, '> 3');
assert.strictEqual(lastLine, '> 3');
});

0 comments on commit 2c75886

Please sign in to comment.