Skip to content

Accept Windows TCP connect timeout in ExceptionContractFixture#710

Merged
rhysparry merged 1 commit into
mainfrom
rhys/eft-3214/fix-exception-contract-windows-connection-refused
Apr 30, 2026
Merged

Accept Windows TCP connect timeout in ExceptionContractFixture#710
rhysparry merged 1 commit into
mainfrom
rhys/eft-3214/fix-exception-contract-windows-connection-refused

Conversation

@rhysparry
Copy link
Copy Markdown
Contributor

Summary

  • On Windows 2019, when the port forwarder is disposed (no longer listening), TCP SYN packets are dropped rather than immediately refused with RST. The client gets "The client was unable to establish the initial connection within the timeout" instead of "Connection refused" or "actively refused it".
  • WhenTheListeningRequestFailsToBeSent_AsTheServiceDoesNotAcceptTheConnection was asserting only on Linux/Windows-RST message strings, causing it to fail on Windows 2019.
  • Adds the Windows timeout message as a valid ContainAny alternative so the test passes on both platforms.

Test plan

  • WhenTheListeningRequestFailsToBeSent_AsTheServiceDoesNotAcceptTheConnection and the two related variants — 3/3 pass locally
  • CI run on Windows 2019 net8.0 — fixes the ExceptionContractFixture failure seen in nightly builds 4709 and 4710

🤖 Generated with Claude Code

On Windows 2019, disposing the port forwarder causes TCP SYN packets to
be dropped rather than immediately refused (no RST), so the client gets
a connect timeout instead of "Connection refused". Add the Windows
timeout message to the ContainAny assertion so the test passes on both
platforms.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@rhysparry rhysparry requested a review from a team as a code owner April 29, 2026 03:48
@rhysparry rhysparry merged commit 847a0bb into main Apr 30, 2026
17 checks passed
@rhysparry rhysparry deleted the rhys/eft-3214/fix-exception-contract-windows-connection-refused branch April 30, 2026 01:32
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.

2 participants