Skip to content

Commit 14f6a5a

Browse files
Trottaddaleax
authored andcommitted
test: fix flaky test-force-repl
test/parallel/test-force-repl.js has an unnecessary timer that makes the test flaky under load. Remove it. PR-URL: #14439 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 509039f commit 14f6a5a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/parallel/test-force-repl.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ const common = require('../common');
33
const assert = require('assert');
44
const spawn = require('child_process').spawn;
55

6-
// spawn a node child process in "interactive" mode (force the repl)
6+
// Spawn a node child process in interactive mode (enabling the REPL) and
7+
// confirm the '> ' prompt is included in the output.
78
const cp = spawn(process.execPath, ['-i']);
8-
// give node + the repl 5 seconds to start
9-
const timeoutId = setTimeout(common.mustNotCall(),
10-
common.platformTimeout(5000));
119

1210
cp.stdout.setEncoding('utf8');
1311

1412
cp.stdout.once('data', common.mustCall(function(b) {
15-
clearTimeout(timeoutId);
1613
assert.strictEqual(b, '> ');
1714
cp.kill();
1815
}));

0 commit comments

Comments
 (0)