This is an automated email from the ASF dual-hosted git repository.

apkhmv pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 015bec952d9 IGNITE-27424 replace waitForCondition with awaitility 
(#7380)
015bec952d9 is described below

commit 015bec952d95806e94f10d3636ac4c9c8f8e2407
Author: Viacheslav Blinov <[email protected]>
AuthorDate: Tue Jan 13 16:54:20 2026 +0300

    IGNITE-27424 replace waitForCondition with awaitility (#7380)
---
 modules/system-disaster-recovery/build.gradle                |  1 +
 .../system/ItMetastorageGroupDisasterRecoveryTest.java       | 12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/system-disaster-recovery/build.gradle 
b/modules/system-disaster-recovery/build.gradle
index c867a843e95..c6198d547e4 100644
--- a/modules/system-disaster-recovery/build.gradle
+++ b/modules/system-disaster-recovery/build.gradle
@@ -55,6 +55,7 @@ dependencies {
     integrationTestImplementation 
testFixtures(project(':ignite-failure-handler'))
     integrationTestImplementation libs.jetbrains.annotations
     integrationTestImplementation libs.okhttp.core
+    integrationTestImplementation libs.awaitility
 }
 
 description = 'ignite-system-disaster-recovery'
diff --git 
a/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItMetastorageGroupDisasterRecoveryTest.java
 
b/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItMetastorageGroupDisasterRecoveryTest.java
index a1de9074859..5a5422b3a1e 100644
--- 
a/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItMetastorageGroupDisasterRecoveryTest.java
+++ 
b/modules/system-disaster-recovery/src/integrationTest/java/org/apache/ignite/internal/disaster/system/ItMetastorageGroupDisasterRecoveryTest.java
@@ -22,13 +22,14 @@ import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.internal.TestWrappers.unwrapIgniteImpl;
 import static 
org.apache.ignite.internal.disaster.system.SystemDisasterRecoveryClient.initiateClusterReset;
 import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.assertThrowsWithCause;
-import static 
org.apache.ignite.internal.testframework.IgniteTestUtils.waitForCondition;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureExceptionMatcher.willThrowWithCauseOrSuppressed;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureExceptionMatcher.willTimeoutIn;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willCompleteSuccessfully;
 import static 
org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willSucceedIn;
+import static org.awaitility.Awaitility.await;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.greaterThan;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.notNullValue;
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
@@ -166,11 +167,10 @@ class ItMetastorageGroupDisasterRecoveryTest extends 
ItSystemGroupDisasterRecove
         ClusterTime clusterTime = ignite.metaStorageManager().clusterTime();
         HybridTimestamp started = clusterTime.currentSafeTime();
 
-        assertTrue(
-                waitForCondition(() -> 
clusterTime.currentSafeTime().longValue() > started.longValue(), 
SECONDS.toMillis(10)),
-                () -> "Did not see " + ignite.name() + " to receive 
Metastorage SafeTime updates; current SafeTime is "
-                        + clusterTime.currentSafeTime()
-        );
+        await("Expected Metastorage SafeTime to advance")
+                .untilAsserted(() -> {
+                    assertThat(clusterTime.currentSafeTime().longValue(), 
greaterThan(started.longValue()));
+                });
     }
 
     @Test

Reply via email to