Skip to content

Commit 6809c2b

Browse files
mscdexMyles Borins
authored and
Myles Borins
committed
test: fix flaky child-process-fork-regr-gh-2847
Windows would die with ECONNRESET most times when running this particular test. This commit makes handling these errors more tolerable. PR-URL: #4442 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 393e569 commit 6809c2b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

test/parallel/parallel.status

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ prefix parallel
77
[true] # This section applies to all platforms
88

99
[$system==win32]
10-
test-child-process-fork-regr-gh-2847 : PASS,FLAKY
1110
test-cluster-net-send : PASS,FLAKY
1211
test-cluster-shared-leak : PASS,FLAKY
1312
test-debug-no-context : PASS,FLAKY

test/parallel/test-child-process-fork-regr-gh-2847.js

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ if (!cluster.isMaster) {
1818
}
1919

2020
var server = net.createServer(function(s) {
21+
if (common.isWindows) {
22+
s.on('error', function(err) {
23+
// Prevent possible ECONNRESET errors from popping up
24+
if (err.code !== 'ECONNRESET' || sendcount === 0)
25+
throw err;
26+
});
27+
}
2128
setTimeout(function() {
2229
s.destroy();
2330
}, 100);

0 commit comments

Comments
 (0)