mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: deflake cluster-concurrent-disconnect
Occasionally the error code is `'ENOTCONN'` on macOS. Add it as an allowed/expected code. Fixes: https://github.com/nodejs/node/issues/38405 PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user