Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 74a703d

Browse filesBrowse files
claudiorodriguezjasnell
authored andcommitted
test: fix flaky test-cluster-shared-leak
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: #5604 PR-URL: #5802 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent b929988 commit 74a703d
Copy full SHA for 74a703d

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-cluster-shared-leak.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-shared-leak.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ if (cluster.isMaster) {
4040
}
4141

4242
const server = net.createServer(function(c) {
43+
c.on('error', function(e) {
44+
// ECONNRESET is OK, so we don't exit with code !== 0
45+
if (e.code !== 'ECONNRESET')
46+
throw e;
47+
});
4348
c.end('bye');
4449
});
4550

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.