Skip to content

Commit

Permalink
test: fix flaky test-cluster-shared-leak
Browse files Browse the repository at this point in the history
Test was flaky on centos7-64 due to an uncaught ECONNRESET
on the worker code. This catches the error so the process
will exit with code 0.

Fixes: nodejs#5604
  • Loading branch information
claudiorodriguez committed Mar 19, 2016
1 parent a53b2ac commit 386c7c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parallel/test-cluster-shared-leak.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ if (cluster.isMaster) {
}

const server = net.createServer(function(c) {
c.on('error', function(e) {
// ECONNRESET is OK, so we don't exit with code !== 0
if (e.code !== 'ECONNRESET')
throw e;
});
c.end('bye');
});

Expand Down

0 comments on commit 386c7c1

Please sign in to comment.