Skip to content

Commit 28f535a

Browse files
committed
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent f6b1eb2 commit 28f535a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-http-hostname-typechecking.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ vals.forEach((v) => {
2121
// These values are OK and should not throw synchronously
2222
['', undefined, null].forEach((v) => {
2323
assert.doesNotThrow(() => {
24-
http.request({hostname: v}).on('error', common.noop);
25-
http.request({host: v}).on('error', common.noop);
24+
http.request({hostname: v}).on('error', common.noop).end();
25+
http.request({host: v}).on('error', common.noop).end();
2626
});
2727
});

0 commit comments

Comments
 (0)