blazingmq icon indicating copy to clipboard operation
blazingmq copied to clipboard

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

Open bbpetukhov opened this issue 10 months ago • 0 comments

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 avatar Apr 09 '25 13:04 bbpetukhov