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 connection recovery tests. #1148

Merged
merged 2 commits into from
Feb 22, 2022
Merged

Conversation

lukebakken
Copy link
Contributor

Fix #1140 by assigning the new Model to _innerChannel at the correct place. This prevents a race condition during consumer recovery.

cc @michaelklishin @bollhals

@lukebakken lukebakken added the bug label Feb 21, 2022
@lukebakken lukebakken added this to the 6.3.0 milestone Feb 21, 2022
@lukebakken lukebakken self-assigned this Feb 21, 2022
Copy link
Member

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

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

I can reproduce this failure reliably on two machines:

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:07.57]     RabbitMQ.Client.Unit.TestConnectionRecovery.TestPublishRpcRightAfterReconnect [FAIL]
  Failed RabbitMQ.Client.Unit.TestConnectionRecovery.TestPublishRpcRightAfterReconnect [3 s]
  Error Message:
   Assert.NotEqual() Failure
Expected: Not 406
Actual:   406
  Stack Trace:
     at RabbitMQ.Client.Unit.TestConnectionRecovery.TestPublishRpcRightAfterReconnect() in /path/to/dotnet_client.git/projects/Unit/TestConnectionRecovery.cs:line 880

@lukebakken
Copy link
Contributor Author

lukebakken commented Feb 21, 2022

Yep, fix one test, break another. Of course that test works fine on my machine.

@lukebakken lukebakken marked this pull request as draft February 21, 2022 20:50
@lukebakken lukebakken marked this pull request as ready for review February 21, 2022 22:29
@lukebakken
Copy link
Contributor Author

@michaelklishin give it another run when you have time.

@michaelklishin michaelklishin merged commit 2d04378 into main Feb 22, 2022
@michaelklishin michaelklishin deleted the rabbitmq-dotnet-client-1140 branch February 22, 2022 19:02
@lukebakken
Copy link
Contributor Author

Thanks. I'll back-port.

@lukebakken lukebakken modified the milestones: 6.3.0, 6.2.4 Feb 22, 2022
@bollhals
Copy link
Contributor

Looks good to me. Good catch!

lukebakken pushed a commit that referenced this pull request Feb 23, 2022
Fix flaky connection recovery tests.

(cherry picked from commit 2d04378)
lukebakken added a commit that referenced this pull request Feb 23, 2022
Merge pull request #1148 from rabbitmq/rabbitmq-dotnet-client-1140
lukebakken added a commit that referenced this pull request Feb 23, 2022
Merge pull request #1148 from rabbitmq/rabbitmq-dotnet-client-1140

(cherry picked from commit 4e50ada)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connection recovery test is flaky
3 participants