Skip to content

Commit

Permalink
add logging, increase repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
mumrah committed Sep 10, 2024
1 parent 78abb3e commit 1bea817
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static void sendBrokerHeartbeatToUnfenceBrokers(
.setBrokerEpoch(brokerEpochs.get(brokerId))
.setBrokerId(brokerId)
.setCurrentMetadataOffset(100000)
).get();
).get(30, TimeUnit.SECONDS);
assertEquals(new BrokerHeartbeatReply(true, false, false, false), reply);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ private void testDelayedConfigurationOperations(
assertEquals(Collections.singletonMap(BROKER0, ApiError.NONE), future1.get());
}

@RepeatedTest(100)
@RepeatedTest(400)
public void testFenceMultipleBrokers() throws Throwable {
List<Integer> allBrokers = Arrays.asList(1, 2, 3, 4, 5);
List<Integer> brokersToKeepUnfenced = Arrays.asList(1);
Expand Down Expand Up @@ -315,17 +315,21 @@ public void testFenceMultipleBrokers() throws Throwable {
Uuid topicIdFoo = createTopicsResponseData.topics().find("foo").topicId();

// Fence some of the brokers
log.debug("Waiting for brokers to be fenced");
TestUtils.waitForCondition(() -> {
sendBrokerHeartbeatToUnfenceBrokers(active, brokersToKeepUnfenced, brokerEpochs);
for (Integer brokerId : brokersToFence) {
if (active.clusterControl().isUnfenced(brokerId)) {
log.debug("Broker {} is still unfenced", brokerId);
return false;
}
}
return true;
}, sessionTimeoutMillis * 3,
"Fencing of brokers did not process within expected time"
);
log.debug("Finished waiting for brokers to be fenced");


// Send another heartbeat to the brokers we want to keep alive
sendBrokerHeartbeatToUnfenceBrokers(active, brokersToKeepUnfenced, brokerEpochs);
Expand Down

0 comments on commit 1bea817

Please sign in to comment.