Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky SignalR test: RequestTimeoutDisabledWhenConnected #59819

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

BrennanConroy
Copy link
Member

await connection.StartAsync(); only waits for the connection headers to be written, which means there is a race between the connection starting and the test checking if the request timeout feature was disabled. To fix this, I added writing and reading to the connection to make sure everything is fully set up on the connection before testing the feature.

@BrennanConroy BrennanConroy added the area-signalr Includes: SignalR clients and servers label Jan 10, 2025
@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 Jan 21, 2025
@@ -3550,6 +3550,10 @@ public async Task RequestTimeoutDisabledWhenConnected(HttpTransportType transpor

await connection.StartAsync();

// Easy way to make sure everything is set is to send and receive data over the connection
await connection.Transport.Output.WriteAsync(new byte[2]);
Copy link
Member

Choose a reason for hiding this comment

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

Are two bytes necessary for this or is any number of bytes sufficient?

Copy link
Member Author

Choose a reason for hiding this comment

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

Any number, not sure why I put 2 😆

@BrennanConroy BrennanConroy merged commit e524b00 into main Jan 21, 2025
27 checks passed
@BrennanConroy BrennanConroy deleted the brecon/flaky branch January 21, 2025 22:54
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Jan 21, 2025
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.

2 participants