Skip to content

Commit

Permalink
node_decommissioning_test: fix order of throttle and decommission
Browse files Browse the repository at this point in the history
If we throttle after we issue the decom command, decom can finish before
the throttling will take effect. The correct order (if we want the
partition movements to get stuck) is throttle-then-decom.

fixes redpanda-data#11365
  • Loading branch information
ztlpn committed Jun 15, 2023
1 parent 5718a80 commit d308a75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/rptest/tests/nodes_decommissioning_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,13 @@ def test_decommissioning_finishes_after_manual_cancellation(
to_decommission = random.choice(self.redpanda.nodes)
node_id = self.redpanda.node_id(to_decommission)

# throttle recovery
self._set_recovery_rate(100)

survivor_node = self._not_decommissioned_node(node_id)
self.logger.info(f"decommissioning node: {node_id}", )
self._decommission(node_id)

self._set_recovery_rate(100)
# wait for some partitions to start moving
wait_until(lambda: self._partitions_moving(node=survivor_node),
timeout_sec=15,
Expand Down

0 comments on commit d308a75

Please sign in to comment.