Skip to content

Commit b6d039d

Browse files
committed
test: deflake test-http-regr-nodejsgh-2928
The socket might take some time to connect. Call `parser.consume()` when the connection is established. Closes: nodejs#49565
1 parent 0a2ab4c commit b6d039d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/sequential/test-http-regr-gh-2928.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ function execAndClose() {
3939
throw e;
4040
});
4141

42-
parser.consume(socket._handle);
42+
socket.on('connect', function() {
43+
parser.consume(socket._handle);
44+
});
4345

4446
parser.onIncoming = function onIncoming() {
4547
process.stdout.write('+');

0 commit comments

Comments
 (0)