Skip to content

Commit 2c6aaf7

Browse files
committed
tests/maintenance_test: increase _has_leadership_role timeout
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.
1 parent a645618 commit 2c6aaf7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/rptest/tests/maintenance_test.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,12 @@ def _enable_maintenance(self, node):
131131
"""
132132
self.logger.debug(
133133
f"Checking that node {node.name} has a leadership role")
134+
# In case the node is unlucky and doesn't get any leaders "naturally",
135+
# we have to wait for the leadership balancer to do its job. We have to wait
136+
# at least 1 minute for it to unmute just restarted nodes and perform another
137+
# tick. Wait more than leader_balancer_idle_timeout (2 minutes) just to be sure.
134138
wait_until(lambda: self._has_leadership_role(node),
135-
timeout_sec=60,
139+
timeout_sec=150,
136140
backoff_sec=10)
137141

138142
self.logger.debug(

0 commit comments

Comments
 (0)