Skip to content

Commit 4eca50a

Browse files
santigimenorvagg
authored andcommitted
test: fix flaky repl-timeout-throw
Don't disconnect the child until all exceptions are thrown. Fixes: #18659 PR-URL: #18692Fixes: #18659 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 3cdae15 commit 4eca50a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
constcommon=require('../common');
2+
require('../common');
33
constassert=require('assert');
44

55
constspawn=require('child_process').spawn;
@@ -13,6 +13,8 @@ child.stdout.setEncoding('utf8');
1313
child.stdout.on('data',function(c){
1414
process.stdout.write(c);
1515
stdout+=c;
16+
if(stdout.includes('> THROW 2'))
17+
child.stdin.end();
1618
});
1719

1820
child.stdin.write=function(original){
@@ -46,8 +48,6 @@ child.stdout.once('data', function(){
4648
'});\n'+
4749
'});\n'+
4850
'});""\n');
49-
50-
setTimeout(child.stdin.end.bind(child.stdin),common.platformTimeout(200));
5151
}
5252
});
5353

0 commit comments

Comments
(0)