Skip to content

Commit

Permalink
tests: await stable leader in transfer test
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Jul 2, 2024
1 parent 8772763 commit 2c009b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/rptest/tests/raft_availability_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,12 @@ def test_leadership_transfer(self):
partition=0,
target_id=None,
leader_id=initial_leader_id)
new_leader_id, _ = self._wait_for_leader(
lambda l: l is not None and l != initial_leader_id)
hosts = [n.account.hostname for n in self.redpanda.nodes]
new_leader_id = admin.await_stable_leader(
topic=self.topic,
partition=0,
hosts=hosts,
check=lambda l: l is not None and l != initial_leader_id)
new_leader_node = self.redpanda.get_node_by_id(new_leader_id)
assert new_leader_node is not None
self.logger.info(
Expand Down

0 comments on commit 2c009b1

Please sign in to comment.