summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-hostname-typechecking.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-04-24 22:25:50 +0200
committerAnna Henningsen <anna@addaleax.net>2017-04-27 17:17:11 +0200
commit28f535a923f14a303ffc23d7082f4def2ff2b554 (patch)
tree9c9ee545fc9aa543b066fd70183d18888ff88f52 /test/parallel/test-http-hostname-typechecking.js
parentf6b1eb2ec4addc3d8d7da3839b89614eeaae6e42 (diff)
downloadandroid-node-v8-28f535a923f14a303ffc23d7082f4def2ff2b554.tar.gz
android-node-v8-28f535a923f14a303ffc23d7082f4def2ff2b554.tar.bz2
android-node-v8-28f535a923f14a303ffc23d7082f4def2ff2b554.zip
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 <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-http-hostname-typechecking.js')
-rw-r--r--test/parallel/test-http-hostname-typechecking.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-http-hostname-typechecking.js b/test/parallel/test-http-hostname-typechecking.js
index 89254f485b..5fd776db27 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();
});
});