Skip to content

test: use one-off agent in http consumed timeout test#64052

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-http-server-consumed-timeout
Open

test: use one-off agent in http consumed timeout test#64052
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-http-server-consumed-timeout

Conversation

@trivikr

@trivikr trivikr commented Jun 22, 2026

Copy link
Copy Markdown
Member

Fixes a flaky hang in parallel/test-http-server-consumed-timeout.

The test can retry with a larger timeout when timer intervals are delayed.
That retry is started from the server.close() callback, but the client
request could leave an idle keep-alive socket open. With the current default
server keep-alive timeout, server.close() can wait long enough for repeated
attempts to hit the test runner timeout.

This changes the client request to use agent: false, so the connection is
not pooled and server.close() can complete promptly.

Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20is%3Aissue%20state%3Aopen%20%22test-http-server-consumed-timeout%22

Example
not ok 2091 parallel/test-http-server-consumed-timeout
  ---
  duration_ms: 120051.76500
  severity: fail
  exitcode: -15
  stack: |-
    timeout
    Time between intervals: 234
    Trying w/ timeout of 468

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>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 22, 2026
@trivikr trivikr added flaky-test Issues and PRs related to the tests with unstable failures on the CI. request-ci Add this label to start a Jenkins CI on a PR. labels Jun 22, 2026
@trivikr trivikr added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 22, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 22, 2026
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr trivikr added the fast-track PRs that do not need to wait for 72 hours to land. label Jun 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Fast-track has been requested by @trivikr. Please 👍 to approve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 72 hours to land. flaky-test Issues and PRs related to the tests with unstable failures on the CI. needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants