Let the check for the error code suffice and don't check for a
particular string in the message.
PR-URL: https://github.com/nodejs/node/pull/34727
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Cover the scenario fixed through
https://github.com/nodejs/node/pull/31621
Unfortunately there is no easy way to test this, in a
cross-platform manner. So the approach is:
- open a child process with ulimit restriction on file descriptors
- in the child process, start few workers - more than the fd limit
- make sure some workers fail, with the expected error type.
- skip the test in windows, as there is no ulimit there.
Refs: https://github.com/nodejs/node/pull/31621
PR-URL: https://github.com/nodejs/node/pull/31929
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>