Skip to content

Commit

Permalink
test: make test-http-agent-maxsockets robust
Browse files Browse the repository at this point in the history
On a slow/busy machine, `test-http-agent-maxsockets` can fail if the
test takes longer than 5 seconds because that is the default value for
`server.keepAliveTimeout`. Disable `keepAliveTimeout` to make the test
robust.

PR-URL: #15192
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
Trott authored and MylesBorins committed Oct 25, 2017
1 parent c4b06b2 commit 514ef74
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/parallel/test-http-agent-maxsockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const server = http.createServer(common.mustCall((req, res) => {
res.end('hello world');
}, 2));

server.keepAliveTimeout = 0;

function get(path, callback) {
return http.get({
host: 'localhost',
Expand Down

0 comments on commit 514ef74

Please sign in to comment.