Skip to content

Commit 259b942

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
test: move timer-dependent test to sequential
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>
1 parent 1726dc7 commit 259b942

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/parallel/test-repl-timeout-throw.js test/sequential/test-repl-timeout-throw.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22
const common = require('../common');
3-
var assert = require('assert');
3+
const assert = require('assert');
44

5-
var spawn = require('child_process').spawn;
5+
const spawn = require('child_process').spawn;
66

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

@@ -52,8 +52,8 @@ child.stdout.once('data', function() {
5252
});
5353

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

0 commit comments

Comments
 (0)