Skip to content

Commit

Permalink
test: fix error handling test-http-full-response
Browse files Browse the repository at this point in the history
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: #14252
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and addaleax committed Jul 21, 2017
1 parent 24b384d commit dcf0a3d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/parallel/test-http-full-response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dcf0a3d

Please sign in to comment.