From 0229581e10f179b85ea9fa972758e50c7b80da43 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 --- 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(); }); });