Skip to content

Commit 3545e23

Browse files
brendanashworthrvagg
authored andcommitted
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: #2429 Reviewed-By: Rich Trott <[email protected]>
1 parent b60e690 commit 3545e23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/parallel/test-net-keepalive.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ var echoServer = net.createServer(function(connection) {
88
serverConnection = connection;
99
connection.setTimeout(0);
1010
assert.notEqual(connection.setKeepAlive, undefined);
11-
// send a keepalive packet after 1000 ms
12-
connection.setKeepAlive(true, 1000);
11+
// send a keepalive packet after 50 ms
12+
connection.setKeepAlive(true, common.platformTimeout(50));
1313
connection.on('end', function() {
1414
connection.end();
1515
});
@@ -27,5 +27,5 @@ echoServer.on('listening', function() {
2727
serverConnection.end();
2828
clientConnection.end();
2929
echoServer.close();
30-
}, 1200);
30+
}, common.platformTimeout(100));
3131
});

0 commit comments

Comments
 (0)