Skip to content

Commit

Permalink
test: deflake cluster-concurrent-disconnect
Browse files Browse the repository at this point in the history
Occasionally the error code is `'ENOTCONN'` on macOS. Add it as an
allowed/expected code.

Fixes: nodejs#38405
  • Loading branch information
lpinca committed Nov 19, 2021
1 parent 8a09a1e commit 3bb5ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-cluster-concurrent-disconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ 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');
assert(['EPIPE', 'ENOTCONN'].includes(err.code), err);
});

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

0 comments on commit 3bb5ba1

Please sign in to comment.