Skip to content

test: drive request timeout ticks after connect#5251

Open
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:test-request-timeout
Open

test: drive request timeout ticks after connect#5251
trivikr wants to merge 1 commit intonodejs:mainfrom
trivikr:test-request-timeout

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 6, 2026

This relates to...

Fixes: #5221

Rationale

Some timeout tests advanced fake timers immediately after dispatching a request. On Windows CI, connection setup and socket/request bookkeeping can be scheduled differently, so fake time may advance before Undici has fully established the connection and installed the relevant parser timeout.

Changes

  • Drive timeout-related fake timer ticks from client.once('connect').
  • Add a small tickOnConnect() helper to keep the tests consistent.
  • Avoid direct kConnect usage in the deadlock timeout test and exercise the normal request connection path.

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.27%. Comparing base (2b0d4c9) to head (7463f00).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5251   +/-   ##
=======================================
  Coverage   93.27%   93.27%           
=======================================
  Files         110      110           
  Lines       36366    36366           
=======================================
  Hits        33922    33922           
  Misses       2444     2444           

☔ View full report in Codecov by Sentry.
📢 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.

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.

[flaky] test\request-timeout.js

2 participants