Skip to content

test: reuse one socket in the HTTP double-end test - #67426

Open
tamird wants to merge 1 commit into
nodejs:mainfrom
tamird:test/http-double-end-socket-reuse
Open

tamird wants to merge 1 commit into
nodejs:mainfrom
tamird:test/http-double-end-socket-reuse

Conversation

@tamird

@tamird tamird commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

The per-request timer can fire before the first response completes on a slow worker, before the test reaches the socket-reuse regression.

Limit the keep-alive agent to one socket and send exactly two requests. Check that double-ending the first response leaves the same socket able to drain the second response and that the client receives both bodies. The test runner bounds a response that never completes.

Assisted-by: Codex

The per-request timer can fire before the first response completes on a
slow worker, before the test reaches the socket-reuse regression.

Limit the keep-alive agent to one socket and send exactly two requests.
Check that double-ending the first response leaves the same socket able
to drain the second response and that the client receives both bodies.
The test runner bounds a response that never completes.

Assisted-by: Codex
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Nov 12, 2026
@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.70%. Comparing base (933cb11) to head (12d7727).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67426   +/-   ##
=======================================
  Coverage   90.69%   90.70%           
=======================================
  Files         801      801           
  Lines      281875   281875           
  Branches    54317    54312    -5     
=======================================
+ Hits       255652   255668   +16     
- Misses      16348    16349    +1     
+ Partials     9875     9858   -17     

see 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants