Skip to content

test(pool): cover a protocol probe whose request is rejected before dispatch - #6142

Open
MIbtehajNasar wants to merge 1 commit into
nodejs:mainfrom
MIbtehajNasar:fix-6141-probe-stuck-on-rejected-request
Open

MIbtehajNasar wants to merge 1 commit into
nodejs:mainfrom
MIbtehajNasar:fix-6141-probe-stuck-on-rejected-request

Conversation

@MIbtehajNasar

@MIbtehajNasar MIbtehajNasar commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #6141

With allowH2 on an https: origin, a Pool makes one Client its protocol probe and queues later requests until ALPN completes. If the request that made a client the probe was rejected while the Request was built (for example an invalid expect header), the client never connected, the probe stayed set, and every later request on the Pool queued forever.

This PR originally fixed that in Pool[kOnClientBusy]. Since #6180, dispatch() no longer reports busy after a synchronous failure, which also fixes #6141, so I've reduced this PR to the regression tests:

  • a request rejected while the Pool is probing does not wedge later requests
  • the probe is cleared again after a clientTtl rotation

Both pass on main and fail if the #6180 change is reverted.

…ispatch

With allowH2 on an https: origin, a Pool makes one Client its protocol
probe and queues later requests until ALPN completes. If the request that
made a client the probe is rejected while the Request is built (for
example an invalid header), the client never connects. This used to leave
the probe set and every later request queued forever (nodejs#6141); it is fixed
on main since dispatch no longer reports busy after a synchronous failure
(nodejs#6180). Add regression tests for it, including after a clientTtl rotation.

Fixes: nodejs#6141
@MIbtehajNasar
MIbtehajNasar force-pushed the fix-6141-probe-stuck-on-rejected-request branch from ac13ee8 to f9b7e37 Compare November 22, 2026 09:58
@MIbtehajNasar MIbtehajNasar changed the title fix(pool): clear the protocol probe when its request is rejected before dispatch test(pool): cover a protocol probe whose request is rejected before dispatch Nov 22, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.74%. Comparing base (5d7f657) to head (f9b7e37).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6142   +/-   ##
=======================================
  Coverage   91.74%   91.74%           
=======================================
  Files         113      113           
  Lines       44849    44849           
=======================================
+ Hits        41147    41148    +1     
+ Misses       3702     3701    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pool hangs forever after a request is rejected while the protocol probe is pending (fresh Pool / after clientTtl rotation)

2 participants