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 <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>
  • Loading branch information
Trott authored and Fishrock123 committed Jul 24, 2017
1 parent 32ba8ae commit b5d0a03
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 b5d0a03

Please sign in to comment.