diff options
author | Brendan Ashworth <brendan.ashworth@me.com> | 2015-08-18 11:45:59 -0700 |
---|---|---|
committer | Brendan Ashworth <brendan.ashworth@me.com> | 2015-08-20 00:49:01 -0700 |
commit | 0d39d35739828afdc388140ccb30420aea3d3484 (patch) | |
tree | 9b14880028259020a058ea5fcefa8552e4c13ea3 /test/parallel/test-net-keepalive.js | |
parent | 2052941149a20bd9070fabf73924cb156ebe68b5 (diff) | |
download | android-node-v8-0d39d35739828afdc388140ccb30420aea3d3484.tar.gz android-node-v8-0d39d35739828afdc388140ccb30420aea3d3484.tar.bz2 android-node-v8-0d39d35739828afdc388140ccb30420aea3d3484.zip |
test: reduce timeouts in test-net-keepalive
Previously 1000-1200ms, they're now (platform dependent) 50-100ms.
Improves test run time on my machine from 0m1.335s to 0m0.236s.
PR-URL: https://github.com/nodejs/node/pull/2429
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test/parallel/test-net-keepalive.js')
-rw-r--r-- | test/parallel/test-net-keepalive.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-net-keepalive.js b/test/parallel/test-net-keepalive.js index 3c339f7aba..efbbc5ea79 100644 --- a/test/parallel/test-net-keepalive.js +++ b/test/parallel/test-net-keepalive.js @@ -8,8 +8,8 @@ var echoServer = net.createServer(function(connection) { serverConnection = connection; connection.setTimeout(0); assert.notEqual(connection.setKeepAlive, undefined); - // send a keepalive packet after 1000 ms - connection.setKeepAlive(true, 1000); + // send a keepalive packet after 50 ms + connection.setKeepAlive(true, common.platformTimeout(50)); connection.on('end', function() { connection.end(); }); @@ -27,5 +27,5 @@ echoServer.on('listening', function() { serverConnection.end(); clientConnection.end(); echoServer.close(); - }, 1200); + }, common.platformTimeout(100)); }); |