This is an automated email from the ASF dual-hosted git repository.
chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new dfd8fdb859a MINOR: Replace String literal with existing String
variable (#13305)
dfd8fdb859a is described below
commit dfd8fdb859a7660c01522c4dca5269771d5491d7
Author: Hoki Min <[email protected]>
AuthorDate: Mon Feb 27 02:57:20 2023 +0900
MINOR: Replace String literal with existing String variable (#13305)
Reviewers: Divij Vaidya <[email protected]>, Chia-Ping Tsai
<[email protected]>
---
.../kafka/clients/producer/internals/DefaultPartitionerTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/clients/src/test/java/org/apache/kafka/clients/producer/internals/DefaultPartitionerTest.java
b/clients/src/test/java/org/apache/kafka/clients/producer/internals/DefaultPartitionerTest.java
index c851408f363..2af61806a34 100644
---
a/clients/src/test/java/org/apache/kafka/clients/producer/internals/DefaultPartitionerTest.java
+++
b/clients/src/test/java/org/apache/kafka/clients/producer/internals/DefaultPartitionerTest.java
@@ -46,7 +46,7 @@ public class DefaultPartitionerTest {
final Partitioner partitioner = new DefaultPartitioner();
final Cluster cluster = new Cluster("clusterId", asList(NODES),
PARTITIONS,
Collections.emptySet(), Collections.emptySet());
- int partition = partitioner.partition("test", null, KEY_BYTES, null,
null, cluster);
- assertEquals(partition, partitioner.partition("test", null, KEY_BYTES,
null, null, cluster), "Same key should yield same partition");
+ int partition = partitioner.partition(TOPIC, null, KEY_BYTES, null,
null, cluster);
+ assertEquals(partition, partitioner.partition(TOPIC, null, KEY_BYTES,
null, null, cluster), "Same key should yield same partition");
}
}