Skip to content

Commit 3849474

Browse files
ronagcodebytere
authored andcommittedMar 3, 2020
test: fix flaky test-gc-net-timeout
If the timeout is called in the time between 'end' and 'close' that would cause a EPIPE error. Essentially making the test flaky. PR-URL: #31918 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 3bd8fea commit 3849474

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎test/parallel/test-gc-net-timeout.js

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ function serverHandler(sock) {
1212
sock.on('close', function() {
1313
clearTimeout(timer);
1414
});
15+
sock.on('end', function() {
16+
clearTimeout(timer);
17+
});
1518
sock.on('error', function(err) {
1619
assert.strictEqual(err.code, 'ECONNRESET');
1720
});

0 commit comments

Comments
 (0)
Please sign in to comment.