diff --git a/tests/kafkatest/tests/core/reassign_partitions_test.py b/tests/kafkatest/tests/core/reassign_partitions_test.py index acacd20241ab8..d7c459bfb9cb3 100644 --- a/tests/kafkatest/tests/core/reassign_partitions_test.py +++ b/tests/kafkatest/tests/core/reassign_partitions_test.py @@ -176,7 +176,11 @@ def test_reassign_partitions(self, bounce_brokers, reassign_from_offset_zero, me self.producer = VerifiableProducer(self.test_context, self.num_producers, self.kafka, self.topic, throughput=self.producer_throughput, - enable_idempotence=True) + enable_idempotence=True, + # This test aims to verify the reassignment without failure, assuming that all partitions have data. + # To avoid the reassignment behavior being affected by the `BuiltInPartitioner` (due to the key not being set), + # we set a key for the message to ensure both even data distribution across all partitions. + repeating_keys=100) self.consumer = ConsoleConsumer(self.test_context, self.num_consumers, self.kafka, self.topic, consumer_timeout_ms=60000,