Skip to content

fix(test-runner): cap webServer availability probe timeout to 1s#40433

Closed
devareddy05 wants to merge 1 commit intomicrosoft:mainfrom
devareddy05:fix-40430
Closed

fix(test-runner): cap webServer availability probe timeout to 1s#40433
devareddy05 wants to merge 1 commit intomicrosoft:mainfrom
devareddy05:fix-40430

Conversation

@devareddy05
Copy link
Copy Markdown
Contributor

Summary

Cap each pre-launch webServer availability probe at 1s so we no longer hang on the OS-default TCP connect timeout (~2 min) when SYNs are silently dropped — notably on WSL mirrored networking where Windows Defender Firewall drops packets to closed loopback ports.

  • isPortUsed(): explicit socket.setTimeout(), treat timeout like a connection error.
  • httpStatusCode(): wrap the request with a timer that calls cancel(). A request-level setTimeout is not enough — Happy Eyeballs only assigns a socket to the request once one address connects, so until then there is no socket for the request-level timeout to attach to.
  • Added regression test that stands up a TCP peer which accepts SYNs but never replies; without the fix the probe hangs indefinitely.

Fixes #40430

@devareddy05
Copy link
Copy Markdown
Contributor Author

@devareddy05 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@Skn0tt
Copy link
Copy Markdown
Member

Skn0tt commented Apr 28, 2026

closed in favour of #40458

@Skn0tt Skn0tt closed this Apr 28, 2026
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.

[Bug]: ECONNREFUSED, PW waits for a 2 mins timeout to start a server in WSL

2 participants