Skip to content

CI: Can preset leader via env var BLAZINGMQ_LEADER_NAME for integration tests #693

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bbpetukhov
Copy link
Collaborator

Describe your changes
Added a new env var BLAZINGMQ_LEADER_NAME which is respected in Integration tests runner. It allows to preset leader node in the cluster fixture.

The preset of leader is done via altering quorum for nodes. If the evn var BLAZINGMQ_LEADER_NAME is specified, for the selected leader quorum is set to 1, for all other nodes -- 100. This approach allows the specified node to win in leader election.

Testing performed

  • Created a new test which simply starts the cluster
  • Tested setting BLAZINGMQ_LEADER_NAME to all 4 nodes (i.e. ['east1', 'east2', 'west1', 'west2']) and making sure that the specified node is selected as leader.

@bbpetukhov bbpetukhov marked this pull request as ready for review April 9, 2025 13:16
@bbpetukhov bbpetukhov requested a review from a team as a code owner April 9, 2025 13:16
@bbpetukhov bbpetukhov force-pushed the can-preset-leader-in-tests branch from df3070f to 457f7ce Compare April 9, 2025 13:27
@bbpetukhov bbpetukhov force-pushed the can-preset-leader-in-tests branch from 457f7ce to 2a021bf Compare April 9, 2025 14:21
@kaikulimu kaikulimu requested a review from jll63 April 9, 2025 18:51
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