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 MylesBorins committed Aug 16, 2017
1 parent 94181d1 commit 27535a6
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 27535a6

Please sign in to comment.