Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: deflake cluster-concurrent-disconnect
Occasionally the error code is `'ENOTCONN'` on macOS. Add it as an
allowed/expected code.

Fixes: #38405
  • Loading branch information
lpinca committed Nov 19, 2021
commit 4e346e85cfbb7a10a47f7508f59fe328eed4ca49
6 changes: 5 additions & 1 deletion test/parallel/test-cluster-concurrent-disconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ if (cluster.isPrimary) {
// to send messages when the worker is disconnecting.
worker.on('error', (err) => {
assert.strictEqual(err.syscall, 'write');
assert.strictEqual(err.code, 'EPIPE');
if (common.isOSX) {
assert(['EPIPE', 'ENOTCONN'].includes(err.code), err);
} else {
assert.strictEqual(err.code, 'EPIPE');
}
});

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