From 23662f36e34bf07bea013861d082c4cf5affe0b1 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 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. PR-URL: https://github.com/nodejs/node/pull/14252 Reviewed-By: Yuta Hiroto Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell --- 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);