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 4288c6a

Browse filesBrowse files
lpincatargos
authored andcommitted
test: deflake cluster-concurrent-disconnect
Occasionally the error code is `'ENOTCONN'` on macOS. Add it as an allowed/expected code. Fixes: #38405 PR-URL: #40877 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
1 parent 009ab4d commit 4288c6a
Copy full SHA for 4288c6a

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

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

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-concurrent-disconnect.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ if (cluster.isPrimary) {
2626
// to send messages when the worker is disconnecting.
2727
worker.on('error', (err) => {
2828
assert.strictEqual(err.syscall, 'write');
29-
assert.strictEqual(err.code, 'EPIPE');
29+
if (common.isOSX) {
30+
assert(['EPIPE', 'ENOTCONN'].includes(err.code), err);
31+
} else {
32+
assert.strictEqual(err.code, 'EPIPE');
33+
}
3034
});
3135

3236
worker.once('disconnect', common.mustCall(() => {

0 commit comments

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