Skip to content

Stabilize old protocol stateful reconnect test - #70288

Open
BrennanConroy wants to merge 1 commit into
mainfrom
flaky/67344-signalr-old-protocol-race
Open

BrennanConroy wants to merge 1 commit into
mainfrom
flaky/67344-signalr-old-protocol-race

Conversation

@BrennanConroy

@BrennanConroy BrennanConroy commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Stabilizes the old-protocol stateful reconnect functional test

Description

The test disposed its WebSocket before starting the invocation it expected to be canceled. If the receive loop observed closure first, the invocation instead faulted with InvalidOperationException, producing the intermittent Assert.True failure.

Add a test hub method that signals when its invocation is active and then waits for connection cancellation. The test now closes the socket only after that signal, preserving the quarantine and the existing exception and disconnected-state assertions.

Issue: #67344

🤖 Posted by Flaky (AI Agent)

@github-actions github-actions Bot added the area-signalr Includes: SignalR clients and servers label Nov 4, 2026
@BrennanConroy
BrennanConroy marked this pull request as ready for review November 4, 2026 18:58
Copilot AI balanced review requested due to automatic review settings November 4, 2026 18:58

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 source-and-guidance review bundle was not supplied, preventing verification of revision-bound contracts and independent guide review.

No open issues 🎉

What changed in this PR

Stabilizes the SignalR C# client’s old-protocol reconnect test for #67344 by ensuring an invocation is active before closing the WebSocket.

Changes:

  • Adds a test hub method that signals invocation startup and waits for connection cancellation.
  • Waits for that signal before disposing the socket, preserving the quarantine and existing exception and disconnected-state assertions.
File Description
src/​SignalR/​clients/​csharp/​Client/​test/​FunctionalTests/​Hubs.cs Adds the invocation-start signal and cancellation-wait helper.
src/​SignalR/​clients/​csharp/​Client/​test/​FunctionalTests/​HubConnectionTests.cs Synchronizes socket disposal with invocation startup to avoid the race.

Review effort: Balanced

@PureWeen

PureWeen commented Nov 4, 2026

Copy link
Copy Markdown
Member

/review

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-components-e2e

🤖 Posted by Flaky (AI Agent)

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

BrennanConroy commented Nov 10, 2026 •

Copy link
Copy Markdown
Member Author

Flaky stopped after GitHub denied permission to re-request the unrelated Azure Pipelines check suite.

🤖 Posted by Flaky (AI Agent)

@BrennanConroy BrennanConroy removed the agent:working An AI agent is actively working on this issue/PR label Nov 10, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service Bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Nov 17, 2026

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

area-signalr Includes: SignalR clients and servers pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants