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 238d01f

Browse filesBrowse files
Trottaddaleax
authored andcommitted
test: allow ENFILE in test-worker-init-failure
Refs: #34727 (comment) PR-URL: #34769 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
1 parent 5119586 commit 238d01f
Copy full SHA for 238d01f

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-worker-init-failure.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-worker-init-failure.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ if (process.argv[2] === 'child') {
3030
});
3131

3232
// We want to test that if there is an error in a constrained running
33-
// environment, it will be one of `EMFILE` or `ERR_WORKER_INIT_FAILED`.
33+
// environment, it will be one of `ENFILE`, `EMFILE`, or
34+
// `ERR_WORKER_INIT_FAILED`.
35+
const allowableCodes = ['ERR_WORKER_INIT_FAILED', 'EMFILE', 'ENFILE'];
36+
3437
// `common.mustCall*` cannot be used here as in some environments
3538
// (i.e. single cpu) `ulimit` may not lead to such an error.
36-
3739
worker.on('error', (e) => {
38-
assert.ok(e.code === 'ERR_WORKER_INIT_FAILED' || e.code === 'EMFILE');
40+
assert.ok(allowableCodes.includes(e.code), `${e.code} not expected`);
3941
});
4042
}
4143

0 commit comments

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