KAFKA-17772 Remove inControlledShutdownBrokers(Set<Integer>) and unfenceBrokers(Set<Integer>) from ReplicationControlManagerTest (#17466)

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Chia-Chuan Yu 2024-10-11 17:14:12 +08:00 committed by GitHub
parent edd3860433
commit b2380d7bf6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 10 deletions

View File

@ -447,10 +447,6 @@ public class ReplicationControlManagerTest {
}
void unfenceBrokers(Integer... brokerIds) {
unfenceBrokers(Utils.mkSet(brokerIds));
}
void unfenceBrokers(Set<Integer> brokerIds) {
for (int brokerId : brokerIds) {
ControllerResult<BrokerHeartbeatReply> result = replicationControl.
processBrokerHeartbeat(new BrokerHeartbeatRequestData().
@ -464,10 +460,6 @@ public class ReplicationControlManagerTest {
}
void inControlledShutdownBrokers(Integer... brokerIds) {
inControlledShutdownBrokers(Utils.mkSet(brokerIds));
}
void inControlledShutdownBrokers(Set<Integer> brokerIds) {
for (int brokerId : brokerIds) {
BrokerRegistrationChangeRecord record = new BrokerRegistrationChangeRecord()
.setBrokerId(brokerId)
@ -2311,7 +2303,7 @@ public class ReplicationControlManagerTest {
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 class ReplicationControlManagerTest {
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});