Skip to content

Commit c3d9329

Browse files
santigimenorvagg
authored andcommitted
test: fix test-http-extra-response flakiness
It can happen that the extra response is to be sent in a different chunk from the rest of the data. At this moment, the client might have already closed the socket causing an `ECONNRESET` error. PR-URL: #4979 Reviewed-By: Brian White <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 725ad5b commit c3d9329

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/parallel/test-http-extra-response.js

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ var server = net.createServer(function(socket) {
3737
socket.end(fullResponse);
3838
}
3939
});
40+
41+
socket.on('error', function(err) {
42+
assert.equal(err.code, 'ECONNRESET');
43+
});
4044
});
4145

4246

0 commit comments

Comments
 (0)