diff --git a/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java b/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java index 676886f42b97..25be7d0de3ac 100644 --- a/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java +++ b/modules/table/src/integrationTest/java/org/apache/ignite/internal/disaster/ItDisasterRecoveryReconfigurationTest.java @@ -1065,20 +1065,23 @@ private boolean stableKeySwitchMessage(NetworkMessage msg, int partId, Assignmen private void waitForPartitionState(IgniteImpl node0, int partId, GlobalPartitionStateEnum expectedState, int... nodeIndexes) throws InterruptedException { assertTrue(waitForCondition(() -> { - CompletableFuture> statesFuture = node0.disasterRecoveryManager() - .globalPartitionStates(Set.of(zoneName), emptySet()); + CompletableFuture> statesFuture = node0.disasterRecoveryManager() + .globalPartitionStates(Set.of(zoneName), emptySet()); - assertThat(statesFuture, willCompleteSuccessfully()); + assertThat(statesFuture, willCompleteSuccessfully()); - Map map = statesFuture.join(); + Map map = statesFuture.join(); - GlobalPartitionState state = map.get(new TablePartitionId(tableId, partId)); + GlobalPartitionState state = map.get(new TablePartitionId(tableId, partId)); - return state != null && state.state == expectedState; - }, 500, SECONDS.toMillis(20)), + return state != null && state.state == expectedState; + }, + 500, + SECONDS.toMillis(20) + ), () -> "Expected state: " + expectedState + ", actual: " + node0.disasterRecoveryManager().globalPartitionStates(Set.of(zoneName), emptySet()).join() - + ",\n nodes states: \n" +nodeStates(node0, partId, nodeIndexes) + + ",\n nodes states: \n" + nodeStates(node0, partId, nodeIndexes) ); } @@ -1140,20 +1143,23 @@ private void assertRaftPartitionState( @Nullable LocalPartitionStateEnum expected ) throws InterruptedException { assertTrue(waitForCondition(() -> { - Map states = raftPartitionStateOnNode(node, targetNodeIdx); + Map states = raftPartitionStateOnNode(node, targetNodeIdx); - if (expected == null) { - return states.isEmpty(); - } + if (expected == null) { + return states.isEmpty(); + } - if (states.isEmpty()) { - return false; - } + if (states.isEmpty()) { + return false; + } - LocalPartitionStateByNode localPartitionStateByNode = states.get(new TablePartitionId(tableId, partId)); + LocalPartitionStateByNode localPartitionStateByNode = states.get(new TablePartitionId(tableId, partId)); - return expected == localPartitionStateByNode.values().iterator().next().state; - }, 250, SECONDS.toMillis(20)), + return expected == localPartitionStateByNode.values().iterator().next().state; + }, + 250, + SECONDS.toMillis(20) + ), () -> "Expected state: " + expected + ", actual: " + raftPartitionStateOnNode(node, targetNodeIdx) ); }