Skip to content

Test SAC with priority consumers #14000

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

Merged
merged 2 commits into from
Jun 2, 2025
Merged

Conversation

MarcialRosales
Copy link
Contributor

This is a unit test for a patch done on a separate PR #13968

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

@MarcialRosales MarcialRosales self-assigned this Jun 2, 2025
Comment on lines 1753 to 1757
{#rabbit_fifo{ cfg = #cfg{resource = Resource}}, ModCalls} = run_log(Config, S0, Entries, fun single_active_invariant/1),
{mod_call,rabbit_quorum_queue,update_consumer_handler,
[Resource,
_,
false,undefined,undefined,false,waiting,[]]} = lists:nth(3, ModCalls),
Copy link
Member

Choose a reason for hiding this comment

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

You added an assertion for only the 3rd effect.
Can we add an assertion that checks for all expected mod_call effects updating the consumers' activity statuses? Even the order of the returned effects can be asserted.
This way, test coverage for updating the consumer activity status will be complete and the test will be easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely ! thanks for reviewing it

@MarcialRosales MarcialRosales force-pushed the test-sac-with-priorities branch 2 times, most recently from f2e34f6 to dc4c578 Compare June 2, 2025 13:34
@MarcialRosales MarcialRosales force-pushed the test-sac-with-priorities branch from dc4c578 to bd037a1 Compare June 2, 2025 13:38
@MarcialRosales MarcialRosales marked this pull request as ready for review June 2, 2025 14:15
@MarcialRosales MarcialRosales changed the title Verify previous active consumer is waiting after higher priority is added Test SAC with priority consumers Jun 2, 2025
@michaelklishin michaelklishin added this to the 4.2.0 milestone Jun 2, 2025
@michaelklishin michaelklishin merged commit 2b2e4d4 into main Jun 2, 2025
283 checks passed
@michaelklishin michaelklishin deleted the test-sac-with-priorities branch June 2, 2025 20:38
michaelklishin added a commit that referenced this pull request Jun 2, 2025
Test SAC with priority consumers

(cherry picked from commit 2b2e4d4)
@michaelklishin
Copy link
Collaborator

Backported manually.

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