Skip to content

Commit 553a326

Browse files
TrottMylesBorins
authored andcommitted
test: fix http-client-timeout-option-listeners
test-http-client-timeout-option-listeners is flaky due to depending on completing operations before a 100ms socket timeout. The socket timeout is an integral part of the test but can be very large. Set to the maximum allowable value. PR-URL: #10224 Reviewed-By: Santiago Gimeno <[email protected]>
1 parent 308cead commit 553a326

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/parallel/test-http-client-timeout-option-listeners.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@ const server = http.createServer((req, res) => {
99
res.end('');
1010
});
1111

12+
// Maximum allowed value for timeouts
13+
const timeout = 2 ** 31 - 1;
14+
1215
const options = {
1316
agent,
1417
method: 'GET',
1518
port: undefined,
1619
host: common.localhostIPv4,
1720
path: '/',
18-
timeout: common.platformTimeout(100)
21+
timeout: timeout
1922
};
2023

2124
server.listen(0, options.host, common.mustCall(() => {

0 commit comments

Comments
 (0)