diff --git a/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java b/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java index b50d32e16bc5d..021ce42640e23 100644 --- a/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java +++ b/metadata/src/test/java/org/apache/kafka/controller/ReplicationControlManagerTest.java @@ -447,10 +447,6 @@ void alterPartition( } void unfenceBrokers(Integer... brokerIds) { - unfenceBrokers(Utils.mkSet(brokerIds)); - } - - void unfenceBrokers(Set brokerIds) { for (int brokerId : brokerIds) { ControllerResult result = replicationControl. processBrokerHeartbeat(new BrokerHeartbeatRequestData(). @@ -464,10 +460,6 @@ void unfenceBrokers(Set brokerIds) { } void inControlledShutdownBrokers(Integer... brokerIds) { - inControlledShutdownBrokers(Utils.mkSet(brokerIds)); - } - - void inControlledShutdownBrokers(Set brokerIds) { for (int brokerId : brokerIds) { BrokerRegistrationChangeRecord record = new BrokerRegistrationChangeRecord() .setBrokerId(brokerId) @@ -2311,7 +2303,7 @@ public void testElectUncleanLeaders_WithoutElr(boolean electAllPartitions) { assertElectLeadersResponse(expectedResponse1, result1.response()); // Now we bring 2 back online which should allow the unclean election of partition 0 - ctx.unfenceBrokers(Utils.mkSet(2)); + ctx.unfenceBrokers(2); // Bring 2 back into the ISR for partition 1. This allows us to verify that // preferred election does not occur as a result of the unclean election request. @@ -2362,7 +2354,7 @@ public void testPreferredElectionDoesNotTriggerUncleanElection() { ctx.fenceBrokers(Utils.mkSet(2, 3)); ctx.fenceBrokers(Utils.mkSet(1, 2, 3)); - ctx.unfenceBrokers(Utils.mkSet(2)); + ctx.unfenceBrokers(2); assertLeaderAndIsr(replication, partition, NO_LEADER, new int[]{1});