Skip to content

Commit

Permalink
test: fixup test-http-hostname-typechecking
Browse files Browse the repository at this point in the history
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
  • Loading branch information
addaleax committed Apr 25, 2017
1 parent c005ebb commit 0229581
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-http-hostname-typechecking.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 0229581

Please sign in to comment.