8000 CI: Can preset leader via env var BLAZINGMQ_LEADER_NAME for integration tests by bbpetukhov · Pull Request #693 · bloomberg/blazingmq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Merged
merged 2 commits into from
May 23, 2025

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 2 times, most recently from 457f7ce to 2a021bf Compare April 9, 2025 14:21
@kaikulimu kaikulimu requested a review from jll63 April 9, 2025 18:51
@bbpetukhov bbpetukhov force-pushed the can-preset-leader-in-tests branch from 2a021bf to 3931571 Compare May 13, 2025 16:38
@kaikulimu kaikulimu assigned bbpetukhov and unassigned jll63 May 22, 2025
Signed-off-by: Dmitrii Petukhov <dpetukhov@bloomberg.net>
Signed-off-by: Dmitrii Petukhov <dpetukhov@bloomberg.net>
@bbpetukhov bbpetukhov force-pushed the can-preset-leader-in-tests branch from 3931571 to 476327d Compare May 23, 2025 12:53
@kaikulimu kaikulimu merged commit f7cde15 into bloomberg:main May 23, 2025
38 of 39 checks passed
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.

3 participants
0