From ca8b5fe50a9bb156951215c63bca5a212a9e9ba2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 15 Jul 2017 07:22:57 -0700 Subject: [PATCH] test: fix error handling in 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. --- test/parallel/test-http-full-response.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/parallel/test-http-full-response.js b/test/parallel/test-http-full-response.js index 42213432090355..2f6fc8fc2a176c 100644 --- a/test/parallel/test-http-full-response.js +++ b/test/parallel/test-http-full-response.js @@ -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);