Skip to content

Stabilize stateful reconnect user change test - #70290

Draft
BrennanConroy wants to merge 1 commit into
mainfrom
flaky/fix-stateful-reconnect-user-change-race
Draft

BrennanConroy wants to merge 1 commit into
mainfrom
flaky/fix-stateful-reconnect-user-change-race

Conversation

@BrennanConroy

@BrennanConroy BrennanConroy commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Stabilize stateful reconnect user change test

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making.

Synchronize the stateful reconnect transport before forcing a disconnect.

Description

ChangingUserNameDuringStatefulReconnectRejectsReconnect disposed the original ClientWebSocket immediately after HubConnection.StartAsync completed. Stateful reconnect can still have an application frame queued in the transport send loop at that point. If disposal wins, WebSocketsTransport logs ErrorSendingMessage with ObjectDisposedException or a closed-stream WebSocketException, and the test server's error verifier fails even though the changed-user rejection behaves correctly.

Send and verify an Echo invocation before disposing the socket. The response is an observable transport barrier: the request and all previously queued frames have been sent and processed before the test intentionally drops the connection. The existing changed-user warning assertion and [QuarantinedTest] attribute remain unchanged.

Validation:

  • SignalR client functional test project build: succeeded with 0 warnings and 0 errors.
  • Focused test without the round-trip barrier: reproduced the exact ErrorSendingMessage failure twice in 45 isolated runs.
  • Focused test with the fix: 100/100 isolated runs passed.
  • Related stateful reconnect functional tests: 6/6 passed.

Issue: #52408

🤖 Posted by Flaky (AI Agent)

Synchronize the initial WebSocket send loop with an Echo round trip before the test intentionally disposes the transport.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the area-signalr Includes: SignalR clients and servers label Nov 4, 2026

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.

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 BrennanConroy added the agent:working An AI agent is actively working on this issue/PR label Nov 10, 2026 — with Copilot SWE Agent

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant