This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch 3.9
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/3.9 by this push:
new 7d14cd6b33a KAFKA-17459 Stablize reassign_partitions_test.py (#17250)
7d14cd6b33a is described below
commit 7d14cd6b33a01790e0492b33d3463f404b7321e7
Author: TengYao Chi <[email protected]>
AuthorDate: Tue Sep 24 17:36:36 2024 +0800
KAFKA-17459 Stablize reassign_partitions_test.py (#17250)
This test expects that each partition can receive the record, so using a
non-null key helps distribute the records more randomly.
Reviewers: Chia-Ping Tsai <[email protected]>
---
tests/kafkatest/tests/core/reassign_partitions_test.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/kafkatest/tests/core/reassign_partitions_test.py
b/tests/kafkatest/tests/core/reassign_partitions_test.py
index acacd20241a..d7c459bfb9c 100644
--- a/tests/kafkatest/tests/core/reassign_partitions_test.py
+++ b/tests/kafkatest/tests/core/reassign_partitions_test.py
@@ -176,7 +176,11 @@ class ReassignPartitionsTest(ProduceConsumeValidateTest):
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,