| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d721c0b commit 1522562
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -91,11 +91,9 @@ class TestDoubleBenchmarker { | |||
| 91 | 91 | create(options) { | |
| 92 | 92 | const child = child_process.fork(this.executable, { | |
| 93 | 93 | silent: true, | |
| 94 | - env: { | ||
| 95 | - duration: options.duration, | ||
| 96 | - connections: options.connections, | ||
| 97 | - path: `http://127.0.0.1:${options.port}${options.path}` | ||
| 98 | - } | ||
| 94 | + env: Object.assign({}, process.env, { | ||
| 95 | + test_url: `http://127.0.0.1:${options.port}${options.path}` | ||
| 96 | + }) | ||
| 99 | 97 | }); | |
| 100 | 98 | return child; | |
| 101 | 99 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,6 @@ | |||
| 2 | 2 | ||
| 3 | 3 | const http = require('http'); | |
| 4 | 4 | ||
| 5 | - http.get(process.env.path, function() { | ||
| 5 | + http.get(process.env.test_url, function() { | ||
| 6 | 6 | console.log(JSON.stringify({ throughput: 1 })); | |
| 7 | 7 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ const expected = common.isWindows ? '%foo%' : '$foo'; | |||
| 8 | 8 | if (process.argv[2] === undefined) { | |
| 9 | 9 | const child = cp.fork(__filename, [expected], { | |
| 10 | 10 | shell: true, | |
| 11 | - env: { foo: 'bar' } | ||
| 11 | + env: Object.assign({}, process.env, { foo: 'bar' }) | ||
| 12 | 12 | }); | |
| 13 | 13 | ||
| 14 | 14 | child.on('exit', common.mustCall((code, signal) => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -311,11 +311,11 @@ function workerProcessMain() { | |||
| 311 | 311 | function spawnMaster({ execArgv, workers, clusterSettings = {} }) { | |
| 312 | 312 | return new Promise((resolve) => { | |
| 313 | 313 | childProcess.fork(__filename, { | |
| 314 | - env: { | ||
| 314 | + env: Object.assign({}, process.env, { | ||
| 315 | 315 | workers: JSON.stringify(workers), | |
| 316 | 316 | clusterSettings: JSON.stringify(clusterSettings), | |
| 317 | 317 | testProcess: true | |
| 318 | - }, | ||
| 318 | + }), | ||
| 319 | 319 | execArgv | |
| 320 | 320 | }).on('exit', common.mustCall((code, signal) => { | |
| 321 | 321 | checkExitCode(code, signal); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments