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

Resolve #1039 Confirms Failure should use ShutdownInitiator.Library #1040

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

StevenBonePgh
Copy link
Contributor

Proposed Changes

Rather than using ShutdownInitiator.Application in ModelBase.WaitForConfirmsOrDieAsync, use ShutdownInitiator.Library so consumers of the library can react differently based on the source of the Close. See #1039.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

Unfortunately, I cannot determine a mechanism by which I can add unit tests to verify this behavior. While this change can be considered a breaking change, it is binary compatible (no public interface changes), and the change aligns with the documented behavioral expectation of Models that were Closed by the library itself. I do not believe that any user of the library would have relied on the previous behavior.

@StevenBonePgh
Copy link
Contributor Author

I've run the tests locally on Windows with this change, and the TestWaitForConfirmsWithEvents is successful consistently with this change. In the debugger, I am seeing Assert.True(c > 20) where c is 88, 96, 72, etc - always well past the threshold for a test failure. Is there a way to rerun the tests?

@michaelklishin michaelklishin merged commit 7557d0c into rabbitmq:master Apr 22, 2021
@michaelklishin
Copy link
Member

I cannot reproduce this failure locally either but such tests are very timing-sensitive.

michaelklishin added a commit that referenced this pull request Apr 22, 2021
Resolve #1039 Confirms Failure should use ShutdownInitiator.Library

(cherry picked from commit 7557d0c)

Conflicts:
	projects/RabbitMQ.Client/client/impl/ModelBase.cs
@michaelklishin
Copy link
Member

Backported to 6.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants