ARTEMIS-5173 Fixing a flaky test

This commit is contained in:
Clebert Suconic 2024-12-12 10:59:08 -05:00
parent 3d6a1db930
commit 69df7ea30d
1 changed files with 5 additions and 1 deletions

View File

@ -159,7 +159,11 @@ public class ReplicatedMultipleServerFailoverExtraBackupsTest extends Replicated
CountDownLatch failoverHappened = new CountDownLatch(1);
session0.addFailoverListener((FailoverEventType type) -> failoverHappened.countDown());
session0.addFailoverListener((FailoverEventType type) -> {
if (type == FailoverEventType.FAILOVER_COMPLETED) {
failoverHappened.countDown();
}
});
for (TestableServer testableServer : toCrash) {
testableServer.crash().await(10, TimeUnit.SECONDS);