rpuch commented on code in PR #7322:
URL: https://github.com/apache/ignite-3/pull/7322#discussion_r2651305366


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/partition/ItPartitionDestructionTest.java:
##########
@@ -520,27 +520,39 @@ private static void verifyPartitionGetsRemovedFromDisk(
             boolean concernNonMvData
     ) throws InterruptedException {
         File partitionFile = testTablePartition0File(ignite, tableId);
-        assertTrue(
-                waitForCondition(() -> !partitionFile.exists(), 
SECONDS.toMillis(10)),
-                "Partition file " + partitionFile.getAbsolutePath() + " was 
not removed in time"
-        );
+        Awaitility.await().atMost(10, SECONDS)
+                .untilAsserted(() -> {
+                    assertThat(
+                            "Partition file " + 
partitionFile.getAbsolutePath() + " was not removed in time.",
+                            !partitionFile.exists()
+                    );
+                });
 
         if (concernNonMvData) {
-            assertTrue(
-                    waitForCondition(() -> 
!hasSomethingInTxStateStorage(ignite, replicationGroupId), 
SECONDS.toMillis(10)),
-                    "Tx state storage was not destroyed in time"
-            );
-
-            assertTrue(
-                    waitForCondition(() -> partitionLogStorage(ignite, 
replicationGroupId).getLastLogIndex() == 0L, SECONDS.toMillis(10)),
-                    "Partition Raft log was not removed in time"
-            );
+            Awaitility.await().atMost(10, SECONDS)
+                    .untilAsserted(() -> {
+                        assertThat(
+                                "Tx state storage was not destroyed in time.",
+                                !hasSomethingInTxStateStorage(ignite, 
replicationGroupId)
+                        );
+                    });
+
+            Awaitility.await().atMost(10, SECONDS)
+                    .untilAsserted(() -> {
+                        assertThat(
+                                "Partition Raft log was not removed in time.",
+                                partitionLogStorage(ignite, 
replicationGroupId).getLastLogIndex() == 0L

Review Comment:
   ```suggestion
                                   partitionLogStorage(ignite, 
replicationGroupId).getLastLogIndex(), is(0L)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to