Skip to content

Conversation

@Ayanda-D
Copy link
Contributor

Proposed Changes

Follow up to #14264 - adding new set of rabbit_ct_helpers specific to waiting while ignoring exceptions, & retaining behaviour of existing await_condition functions which should terminate/fail on exceptions.

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)
  • Build system and/or CI

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)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution
you did and what alternatives you considered, etc.

Copy link
Member

@ansd ansd left a comment

Choose a reason for hiding this comment

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

Instead of introducing these 3 functions, can't you just use a try ... catch in the ConditionFun returning false in the catch block?

@michaelklishin
Copy link
Collaborator

@Ayanda-D someone on our team wonders, have you considered having try… catch blocks in the Condition function? Or is it exactly the problem you are trying to solve here, the need to specify a try… catch block in so many times it becomes very repetitive?

@Ayanda-D
Copy link
Contributor Author

Ayanda-D commented Jul 22, 2025

@michaelklishin @ansd yeah, thats the problem we're trying to solve here - to avoid repeating the same code logic on many tests (and across different multiple plugins) and just re-use from rabbit_ct_helpers.

@michaelklishin michaelklishin added this to the 4.2.0 milestone Jul 22, 2025
@michaelklishin michaelklishin merged commit 8c8a2e9 into rabbitmq:main Jul 22, 2025
280 of 281 checks passed
michaelklishin added a commit that referenced this pull request Jul 22, 2025
Introduce rabbit_ct_helpers:await_condition_* helpers which ignore exceptions (backport #14270)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants