diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js index f9359b13d5e9e4..54b7481afaa817 100644 --- a/benchmark/_http-benchmarkers.js +++ b/benchmark/_http-benchmarkers.js @@ -91,11 +91,9 @@ class TestDoubleBenchmarker { create(options) { const child = child_process.fork(this.executable, { silent: true, - env: { - duration: options.duration, - connections: options.connections, - path: `http://127.0.0.1:${options.port}${options.path}` - } + env: Object.assign({}, process.env, { + test_url: `http://127.0.0.1:${options.port}${options.path}` + }) }); return child; } diff --git a/benchmark/_test-double-benchmarker.js b/benchmark/_test-double-benchmarker.js index 0a8c5f9264efc8..8c2f744fbf6e9f 100644 --- a/benchmark/_test-double-benchmarker.js +++ b/benchmark/_test-double-benchmarker.js @@ -2,6 +2,6 @@ const http = require('http'); -http.get(process.env.path, function() { +http.get(process.env.test_url, function() { console.log(JSON.stringify({ throughput: 1 })); }); diff --git a/test/parallel/test-child-process-fork-no-shell.js b/test/parallel/test-child-process-fork-no-shell.js index 7a085913fbf4a3..168f115b0cbcbf 100644 --- a/test/parallel/test-child-process-fork-no-shell.js +++ b/test/parallel/test-child-process-fork-no-shell.js @@ -8,7 +8,7 @@ const expected = common.isWindows ? '%foo%' : '$foo'; if (process.argv[2] === undefined) { const child = cp.fork(__filename, [expected], { shell: true, - env: { foo: 'bar' } + env: Object.assign({}, process.env, { foo: 'bar' }) }); child.on('exit', common.mustCall((code, signal) => { diff --git a/test/sequential/test-inspector-port-cluster.js b/test/sequential/test-inspector-port-cluster.js index 3b2464d81268b4..2428a7844e98c0 100644 --- a/test/sequential/test-inspector-port-cluster.js +++ b/test/sequential/test-inspector-port-cluster.js @@ -311,11 +311,11 @@ function workerProcessMain() { function spawnMaster({ execArgv, workers, clusterSettings = {} }) { return new Promise((resolve) => { childProcess.fork(__filename, { - env: { + env: Object.assign({}, process.env, { workers: JSON.stringify(workers), clusterSettings: JSON.stringify(clusterSettings), testProcess: true - }, + }), execArgv }).on('exit', common.mustCall((code, signal) => { checkExitCode(code, signal);