From 3545e236fc1af93738625ecc6a23b86dc8d7c7a1 Mon Sep 17 00:00:00 2001 From: Brendan Ashworth Date: Tue, 18 Aug 2015 11:45:59 -0700 Subject: [PATCH] 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 --- test/parallel/test-net-keepalive.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-net-keepalive.js b/test/parallel/test-net-keepalive.js index 3c339f7abaa350..efbbc5ea7986bb 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)); });