Skip to content
Permalink
Browse files

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: #12627
Ref: #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>
  • Loading branch information...
addaleax committed Apr 24, 2017
1 parent f6b1eb2 commit 28f535a923f14a303ffc23d7082f4def2ff2b554
Showing with 2 additions and 2 deletions.
  1. +2 −2 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();
});
});

0 comments on commit 28f535a

Please sign in to comment.
You can’t perform that action at this time.