Skip to content

Commit

Permalink
tests/maintenance_test: increase _has_leadership_role timeout
Browse files Browse the repository at this point in the history
Previously we waited for 50 seconds in total to ensure that the node has
some leaders. If it hadn't acquired any leaders "naturally", this was
not enough because the leadership balancer needs at least 1 minute to
unmute just restarted nodes and perform another tick.

(cherry picked from commit 2c6aaf7)
  • Loading branch information
ztlpn authored and vbotbuildovich committed Jul 17, 2024
1 parent 5beb256 commit fed355e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/rptest/tests/maintenance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,12 @@ def _enable_maintenance(self, node):
"""
self.logger.debug(
f"Checking that node {node.name} has a leadership role")
# In case the node is unlucky and doesn't get any leaders "naturally",
# we have to wait for the leadership balancer to do its job. We have to wait
# at least 1 minute for it to unmute just restarted nodes and perform another
# tick. Wait more than leader_balancer_idle_timeout (2 minutes) just to be sure.
wait_until(lambda: self._has_leadership_role(node),
timeout_sec=60,
timeout_sec=150,
backoff_sec=10)

self.logger.debug(
Expand Down

0 comments on commit fed355e

Please sign in to comment.