Skip to content

Commit aaf7834

Browse files
santigimenoMyles Borins
authored and
Myles Borins
committed
test: fix flaky test-force-repl-with-eval
Remove the timer just in case the test takes longer to complete. PR-URL: #9460 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent d926f16 commit aaf7834

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/parallel/test-force-repl-with-eval.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
'use strict';
2-
const common = require('../common');
2+
require('../common');
33
const assert = require('assert');
44
const spawn = require('child_process').spawn;
55

66
// spawn a node child process in "interactive" mode (force the repl) and eval
77
const cp = spawn(process.execPath, ['-i', '-e', 'console.log("42")']);
88
var gotToEnd = false;
9-
const timeoutId = setTimeout(function() {
10-
throw new Error('timeout!');
11-
}, common.platformTimeout(1000)); // give node + the repl 1 second to boot up
129

1310
cp.stdout.setEncoding('utf8');
1411

1512
var output = '';
1613
cp.stdout.on('data', function(b) {
1714
output += b;
1815
if (output === '> 42\n') {
19-
clearTimeout(timeoutId);
2016
gotToEnd = true;
2117
cp.kill();
2218
}

0 commit comments

Comments
 (0)