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 MylesBorins committed Sep 5, 2017
1 parent 7a8eddf commit d7afa17
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 @@ -25,8 +25,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 d7afa17

Please sign in to comment.