Skip to content

Commit 514ef74

Browse files
TrottMylesBorins
authored andcommitted
test: make test-http-agent-maxsockets robust
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>
1 parent c4b06b2 commit 514ef74

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/parallel/test-http-agent-maxsockets.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const server = http.createServer(common.mustCall((req, res) => {
1515
res.end('hello world');
1616
}, 2));
1717

18+
server.keepAliveTimeout = 0;
19+
1820
function get(path, callback) {
1921
return http.get({
2022
host: 'localhost',

0 commit comments

Comments
 (0)