Skip to content

Commit 00cd668

Browse files
committed
test: use one-off agent in http consumed timeout test
Disable connection pooling for the client request so server.close() does not wait on an idle keep-alive socket before retrying the test. This keeps the test focused on request timeout behavior instead of HTTP keep-alive teardown timing. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
1 parent 2e19033 commit 00cd668

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/parallel/test-http-server-consumed-timeout.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function runTest(timeoutDuration) {
5858
server.listen(0, common.mustCall(() => {
5959
const req = http.request({
6060
port: server.address().port,
61-
method: 'POST'
61+
method: 'POST',
62+
agent: false,
6263
}, () => {
6364
let lastIntervalTimestamp = Date.now();
6465
const interval = setInterval(() => {

0 commit comments

Comments
 (0)