Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-16571: reassign_partitions_test.bounce_brokers should wait for messages to be sent to every partition #15739

Merged
merged 4 commits into from
Apr 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/kafkatest/tests/core/reassign_partitions_test.py
Expand Up @@ -94,6 +94,18 @@ def reassign_partitions(self, bounce_brokers):
partition_info["partitions"][i]["partition"] = shuffled_list[i]
self.logger.debug("Jumbled partitions: " + str(partition_info))

def check_all_partitions():
acked_partitions = self.producer.acked_by_partition
for i in range(self.num_partitions):
if f"{self.topic}-{i}" not in acked_partitions:
return False
return True

# ensure all partitions have data so we don't hit OutOfOrderExceptions due to broker restarts
wait_until(check_all_partitions,
timeout_sec=30,
err_msg="Failed to produce to all partitions in 30s")

# send reassign partitions command
self.kafka.execute_reassign_partitions(partition_info)

Expand Down