Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

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/node#5604
PR-URL: nodejs/node#5802
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
claudiorodriguez authored and jasnell committed Mar 21, 2016
1 parent b929988 commit 74a703d
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 74a703d

Please sign in to comment.