Skip to content

Use dynamic ports in delayed test apps - #69908

Merged
wtgodbe merged 1 commit into
dotnet:mainfrom
wtgodbe:wtgodbe/use-dynamic-delayed-test-ports
Oct 16, 2026
Merged

wtgodbe merged 1 commit into
dotnet:mainfrom
wtgodbe:wtgodbe/use-dynamic-delayed-test-ports

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Use dynamic ports in delayed test apps

Impact: Eliminates address-in-use failures when delayed SignalR and Validation test applications run concurrently on the same CI machine.

Use ephemeral ports in delayed test applications

Description

Configures the SignalR trimming app and the Validation trimming/NativeAOT app to bind to 127.0.0.1:0, then uses the address selected by Kestrel for their client requests.

Validation:

  • source activate.sh && dotnet build src/SignalR/server/SignalR/test/Microsoft.AspNetCore.SignalR.TrimmingTests/Microsoft.AspNetCore.SignalR.TrimmingTests.proj -v:minimal — passed.
  • source activate.sh && dotnet build src/Validation/test/Microsoft.Extensions.Validation.NativeAotTests/Microsoft.Extensions.Validation.NativeAotTests.proj -v:minimal — passed.
  • With port 5000 reserved, the pre-change SignalR and Validation applications each failed with AddressInUseException and exit code 134.
  • With port 5000 still reserved, both changed published applications completed successfully with exit code 100 while listening on separate ephemeral loopback ports.

Related to internal CI build 3107295; no public issue.

Copilot AI balanced review requested due to automatic review settings October 16, 2026 21:57
@github-actions github-actions Bot added the area-signalr Includes: SignalR clients and servers label Oct 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The required frozen review evidence was unavailable, leaving approval checks incomplete.

No open issues 🎉

What changed in this PR

Updates delayed test applications to use ephemeral loopback ports, avoiding port conflicts during concurrent CI runs.

Changes:

  • Configures both applications to bind to 127.0.0.1:0.
  • Updates the Validation client to use Kestrel’s assigned address.
File Description
src/​Validation/​test/​Microsoft.Extensions.Validation.NativeAotTests/​BasicMinimalApiWithValidation.cs Uses an ephemeral port and discovers the client’s base address.
src/​SignalR/​server/​SignalR/​test/​Microsoft.AspNetCore.SignalR.TrimmingTests/​TestTypedClients.cs Configures an ephemeral loopback port.

Review effort: Balanced

@wtgodbe
wtgodbe merged commit c09e2b8 into dotnet:main Oct 16, 2026
29 of 30 checks passed
@wtgodbe
wtgodbe temporarily deployed to copilot-pat-pool October 16, 2026 23:46 — with GitHub Actions Inactive
@wtgodbe
wtgodbe temporarily deployed to copilot-pat-pool October 16, 2026 23:46 — with GitHub Actions Inactive
@wtgodbe
wtgodbe temporarily deployed to copilot-pat-pool October 16, 2026 23:47 — with GitHub Actions Inactive
@wtgodbe
wtgodbe temporarily deployed to copilot-pat-pool October 16, 2026 23:48 — with GitHub Actions Inactive
@wtgodbe
wtgodbe temporarily deployed to copilot-pat-pool October 16, 2026 23:49 — with GitHub Actions Inactive
@wtgodbe
wtgodbe temporarily deployed to copilot-pat-pool October 16, 2026 23:50 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 2%

No docs needed: the PR only changes test infrastructure to use dynamic ports. Signals showed no_signal.

Documentation surfaces considered

  • Conceptual article: Not required — Only test apps changed (TestTypedClients.cs, BasicMinimalApiWithValidation.cs); no user-facing behavior.
  • Migration guidance: Not required — No upgrade impact; test infrastructure only.
  • Breaking change: Not required — No public API or behavior change.

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 5ceab572 Deployed Oct 16, 2026 by wtgodbe via conclusion #65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-signalr Includes: SignalR clients and servers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants