diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2019-12-07 13:57:46 +0100 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-12-08 21:05:59 -0800 |
commit | ba612536725da20fe1fdbdec748dc1aca63d6357 (patch) | |
tree | b0f5f7f7e2def25078165e28aa965c0af4564fa0 | |
parent | eac3f0adc46c3af0e94d70bb8635440382df7d7f (diff) | |
download | android-node-v8-ba612536725da20fe1fdbdec748dc1aca63d6357.tar.gz android-node-v8-ba612536725da20fe1fdbdec748dc1aca63d6357.tar.bz2 android-node-v8-ba612536725da20fe1fdbdec748dc1aca63d6357.zip |
test: scale keepalive timeouts for slow machines
The test was using fixed timeouts and that seems to be causing sporadic
test failures on pi1-docker host (which is a very slow machine.)
Fixes: https://github.com/nodejs/node/issues/30828
PR-URL: https://github.com/nodejs/node/pull/30834
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-rw-r--r-- | test/sequential/test-https-server-keep-alive-timeout.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sequential/test-https-server-keep-alive-timeout.js b/test/sequential/test-https-server-keep-alive-timeout.js index 3c18d325c1..5ded520dc7 100644 --- a/test/sequential/test-https-server-keep-alive-timeout.js +++ b/test/sequential/test-https-server-keep-alive-timeout.js @@ -34,13 +34,13 @@ test(function serverKeepAliveTimeoutWithPipeline(cb) { common.mustCall((req, res) => { res.end(); }, 3)); - server.setTimeout(500, common.mustCall((socket) => { + server.setTimeout(common.platformTimeout(500), common.mustCall((socket) => { // End this test and call `run()` for the next test (if any). socket.destroy(); server.close(); cb(); })); - server.keepAliveTimeout = 50; + server.keepAliveTimeout = common.platformTimeout(50); server.listen(0, common.mustCall(() => { const options = { port: server.address().port, @@ -57,13 +57,13 @@ test(function serverKeepAliveTimeoutWithPipeline(cb) { test(function serverNoEndKeepAliveTimeoutWithPipeline(cb) { const server = https.createServer(serverOptions, common.mustCall(3)); - server.setTimeout(500, common.mustCall((socket) => { + server.setTimeout(common.platformTimeout(500), common.mustCall((socket) => { // End this test and call `run()` for the next test (if any). socket.destroy(); server.close(); cb(); })); - server.keepAliveTimeout = 50; + server.keepAliveTimeout = common.platformTimeout(50); server.listen(0, common.mustCall(() => { const options = { port: server.address().port, |