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 c4eeb88

Browse filesBrowse files
mscdexMyles Borins
authored andcommitted
test: fix flaky cluster-disconnect-race
On single core Windows systems, process.send() would cause an EPIPE because of the ordering of the IPC channel disconnect and the process.send(). The test was originally only relevant for non-Windows platforms, so this commit merely skips the test on Windows. Fixes: #4450 PR-URL: #4457 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 82cbfcd commit c4eeb88
Copy full SHA for c4eeb88

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-cluster-disconnect-race.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-disconnect-race.js
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ const common = require('../common');
77
const assert = require('assert');
88
const net = require('net');
99
const cluster = require('cluster');
10+
11+
if (common.isWindows) {
12+
console.log('1..0 # Skipped: This test does not apply to Windows.');
13+
return;
14+
}
15+
1016
cluster.schedulingPolicy = cluster.SCHED_NONE;
1117

1218
if (cluster.isMaster) {
@@ -19,9 +25,9 @@ if (cluster.isMaster) {
1925
worker2.on('online', common.mustCall(worker2.disconnect));
2026
}));
2127

22-
cluster.on('exit', function(worker, code) {
28+
cluster.on('exit', common.mustCall(function(worker, code) {
2329
assert.strictEqual(code, 0, 'worker exited with error');
24-
});
30+
}, 2));
2531

2632
return;
2733
}

0 commit comments

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