summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/_http-benchmarkers.js8
-rw-r--r--benchmark/_test-double-benchmarker.js2
-rw-r--r--test/parallel/test-child-process-fork-no-shell.js2
-rw-r--r--test/sequential/test-inspector-port-cluster.js4
4 files changed, 7 insertions, 9 deletions
diff --git a/benchmark/_http-benchmarkers.js b/benchmark/_http-benchmarkers.js
index f9359b13d5..54b7481afa 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 0a8c5f9264..8c2f744fbf 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 7a085913fb..168f115b0c 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 3b2464d812..2428a7844e 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);