test: fix error handling test-http-full-response

The way it is currently written, test-http-full-response will fail if
there is a problem with spawning that doesn't include `ab` or `api` in
`stderr`, but it will fail with a misleading mismatched-calls
`common.mustCall()` error.

Alter the error handling so that it rethrows the actual error, providing
better information.

PR-URL: https://github.com/nodejs/node/pull/14252
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott 2017-07-15 07:22:57 -07:00
parent a3365c6ae9
commit 23662f36e3

View File

@ -46,8 +46,7 @@ function runAb(opts, callback) {
common.printSkipMessage(`problem spawning \`ab\`.\n${stderr}`);
process.reallyExit(0);
}
process.exit();
return;
throw err;
}
let m = /Document Length:\s*(\d+) bytes/i.exec(stdout);