Skip to content

Commit

Permalink
test: deflake test-http-regr-nodejsgh-2928
Browse files Browse the repository at this point in the history
The socket might take some time to connect. Call `parser.consume()` when
the connection is established.

Closes: nodejs#49565
  • Loading branch information
lpinca committed Sep 9, 2023
1 parent 0a2ab4c commit b6d039d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/sequential/test-http-regr-gh-2928.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function execAndClose() {
throw e;
});

parser.consume(socket._handle);
socket.on('connect', function() {
parser.consume(socket._handle);
});

parser.onIncoming = function onIncoming() {
process.stdout.write('+');
Expand Down

0 comments on commit b6d039d

Please sign in to comment.