From 4a5c719be50c7998684768b54d06860cb2c1d6fb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 10 Dec 2016 20:38:06 -0800 Subject: [PATCH] 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 --- test/parallel/test-http-client-timeout-option-listeners.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-http-client-timeout-option-listeners.js b/test/parallel/test-http-client-timeout-option-listeners.js index 3ac6cd4616b496..727b5fddf09624 100644 --- a/test/parallel/test-http-client-timeout-option-listeners.js +++ b/test/parallel/test-http-client-timeout-option-listeners.js @@ -9,13 +9,16 @@ const server = http.createServer((req, res) => { res.end(''); }); +// Maximum allowed value for timeouts +const timeout = 2 ** 31 - 1; + const options = { agent, method: 'GET', port: undefined, host: common.localhostIPv4, path: '/', - timeout: common.platformTimeout(100) + timeout: timeout }; server.listen(0, options.host, common.mustCall(() => {