mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
edece30930
commit
a92f3dfd8c
1 file changed
+2
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user