From 28f535a923f14a303ffc23d7082f4def2ff2b554 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 24 Apr 2017 22:25:50 +0200 Subject: [PATCH] test: fixup test-http-hostname-typechecking This test would currently create HTTP requests to localhost:80 and would time out on machines that actually had an server listening there. To address that, `end()` the requests that are generated. PR-URL: https://github.com/nodejs/node/pull/12627 Ref: https://github.com/nodejs/node/pull/12494 Reviewed-By: Daniel Bevenius Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- test/parallel/test-http-hostname-typechecking.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-http-hostname-typechecking.js b/test/parallel/test-http-hostname-typechecking.js index 89254f485bd962..5fd776db27f3ef 100644 --- a/test/parallel/test-http-hostname-typechecking.js +++ b/test/parallel/test-http-hostname-typechecking.js @@ -21,7 +21,7 @@ vals.forEach((v) => { // These values are OK and should not throw synchronously ['', undefined, null].forEach((v) => { assert.doesNotThrow(() => { - http.request({hostname: v}).on('error', common.noop); - http.request({host: v}).on('error', common.noop); + http.request({hostname: v}).on('error', common.noop).end(); + http.request({host: v}).on('error', common.noop).end(); }); });