From e064aa84b609285deada955733bc97da1be178da Mon Sep 17 00:00:00 2001 From: Michal Maslanka Date: Mon, 16 Oct 2023 09:40:21 +0200 Subject: [PATCH] tests: retry on timeout in partition balancer test In partition balancer maintenance mode test one of the nodes is made unavailable. In some cases the node may be suspended while being a `redpanda/controller` partition leader. In this case changing configuration may result in timeout, which is perfectly fine. We should allow Admin client to retry in this case. Fixes: #14047 Signed-off-by: Michal Maslanka (cherry picked from commit bdab660aded70a593e6b7665b6c426885ff3b6e7) --- tests/rptest/tests/partition_balancer_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rptest/tests/partition_balancer_test.py b/tests/rptest/tests/partition_balancer_test.py index 40b0339e44ec..f028f5a13c97 100644 --- a/tests/rptest/tests/partition_balancer_test.py +++ b/tests/rptest/tests/partition_balancer_test.py @@ -930,7 +930,7 @@ def test_maintenance_mode(self, kill_same_node): node_id = self.redpanda.idx(node) rpk = RpkTool(self.redpanda) - admin = Admin(self.redpanda) + admin = Admin(self.redpanda, retry_codes=[503, 504]) rpk.cluster_maintenance_enable(node, wait=True) # the node should now report itself in maintenance mode