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: https://github.com/nodejs/node/pull/10224 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
parent
e27c2a76a8
commit
4a5c719be5
@ -9,13 +9,16 @@ const server = http.createServer((req, res) => {
|
|||||||
res.end('');
|
res.end('');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Maximum allowed value for timeouts
|
||||||
|
const timeout = 2 ** 31 - 1;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
agent,
|
agent,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
port: undefined,
|
port: undefined,
|
||||||
host: common.localhostIPv4,
|
host: common.localhostIPv4,
|
||||||
path: '/',
|
path: '/',
|
||||||
timeout: common.platformTimeout(100)
|
timeout: timeout
|
||||||
};
|
};
|
||||||
|
|
||||||
server.listen(0, options.host, common.mustCall(() => {
|
server.listen(0, options.host, common.mustCall(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user