From 87eaa5396d991b53ef89e58c37b54b6c1517b554 Mon Sep 17 00:00:00 2001 From: Kun Song Date: Sat, 8 Feb 2020 22:14:21 +0800 Subject: [PATCH] MINOR: Simplify KafkaProducerTest (#8044) Reviewers: Mickael Maison , Ron Dagostino --- .../apache/kafka/clients/producer/KafkaProducerTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java b/clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java index e5dc27e0abc..1d648ef2548 100644 --- a/clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java +++ b/clients/src/test/java/org/apache/kafka/clients/producer/KafkaProducerTest.java @@ -103,19 +103,21 @@ public class KafkaProducerTest { private String topic = "topic"; private Node host1 = new Node(0, "host1", 1000); private Collection nodes = Collections.singletonList(host1); - private final Cluster emptyCluster = new Cluster(null, nodes, + private final Cluster emptyCluster = new Cluster( + null, + nodes, Collections.emptySet(), Collections.emptySet(), Collections.emptySet()); private final Cluster onePartitionCluster = new Cluster( "dummy", - Collections.singletonList(host1), + nodes, Collections.singletonList(new PartitionInfo(topic, 0, null, null, null)), Collections.emptySet(), Collections.emptySet()); private final Cluster threePartitionCluster = new Cluster( "dummy", - Collections.singletonList(host1), + nodes, Arrays.asList( new PartitionInfo(topic, 0, null, null, null), new PartitionInfo(topic, 1, null, null, null),