Skip to content

Commit 7c31aa6

Browse files
committed
fixup! fixup! fixup! fixup! src: set UV_THREADPOOL_SIZE based on available parallelism
1 parent 838c762 commit 7c31aa6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/node-api/test_uv_threadpool_size/node-options.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ const code = `
1919
assert.strictEqual(size, 4);
2020
test(size);
2121
`.trim();
22+
// Strip UV_THREADPOOL_SIZE from the inherited environment so that the
23+
// --env-file value is not shadowed by the dynamic default set by the parent.
24+
const env = { ...process.env };
25+
delete env.UV_THREADPOOL_SIZE;
2226
const child = spawnSync(
2327
process.execPath,
2428
[ `--env-file=${uvThreadPoolPath}`, '--eval', code ],
25-
{ cwd: __dirname, encoding: 'utf-8' },
29+
{ cwd: __dirname, encoding: 'utf-8', env },
2630
);
2731
assert.strictEqual(child.stderr, '');
2832
assert.strictEqual(child.status, 0);

0 commit comments

Comments
 (0)