This is an automated email from the ASF dual-hosted git repository.
mpochatkin 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 980c8a98fd2 IGNITE-26922 Deprecate waitForCondition (#6893)
980c8a98fd2 is described below
commit 980c8a98fd29d95d258270b2fe650e74c1f8d6c0
Author: Ivan Zlenko <[email protected]>
AuthorDate: Wed Nov 5 13:04:55 2025 +0500
IGNITE-26922 Deprecate waitForCondition (#6893)
---
modules/core/build.gradle | 1 +
.../apache/ignite/internal/testframework/IgniteTestUtils.java | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/modules/core/build.gradle b/modules/core/build.gradle
index e9d90d004c6..36b76dc70f6 100644
--- a/modules/core/build.gradle
+++ b/modules/core/build.gradle
@@ -43,6 +43,7 @@ dependencies {
testFixturesImplementation project(':ignite-api')
testFixturesImplementation libs.auto.service.annotations
testFixturesImplementation libs.junit.testkit
+ testFixturesImplementation libs.awaitility
}
test {
diff --git
a/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
b/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
index 9e70c20f5f6..08bcbf50428 100644
---
a/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
+++
b/modules/core/src/testFixtures/java/org/apache/ignite/internal/testframework/IgniteTestUtils.java
@@ -76,6 +76,7 @@ import org.apache.ignite.internal.thread.IgniteThreadFactory;
import org.apache.ignite.internal.thread.ThreadOperation;
import org.apache.ignite.internal.util.ExceptionUtils;
import org.apache.ignite.lang.IgniteException;
+import org.awaitility.Awaitility;
import org.hamcrest.CustomMatcher;
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.Assertions;
@@ -654,11 +655,15 @@ public final class IgniteTestUtils {
/**
* Waits for the condition.
*
+ * <p>This method is deprecated in favor of the Awaitility library; use
{@link Awaitility#await()} instead.
+ *
* @param cond Condition.
* @param timeoutMillis Timeout in milliseconds.
* @return {@code True} if the condition was satisfied within the timeout.
* @throws InterruptedException If waiting was interrupted.
+ * @see Awaitility#await()
*/
+ @Deprecated
public static boolean waitForCondition(BooleanSupplier cond, long
timeoutMillis) throws InterruptedException {
return waitForCondition(cond, 10, timeoutMillis);
}
@@ -666,13 +671,17 @@ public final class IgniteTestUtils {
/**
* Waits for the condition.
*
+ * <p>This method is deprecated in favor of the Awaitility library; use
{@link Awaitility#await()} instead.
+ *
* @param cond Condition.
* @param sleepMillis Sleep im milliseconds.
* @param timeoutMillis Timeout in milliseconds.
* @return {@code True} if the condition was satisfied within the timeout.
* @throws InterruptedException If waiting was interrupted.
+ * @see Awaitility#await()
*/
@SuppressWarnings("BusyWait")
+ @Deprecated
public static boolean waitForCondition(BooleanSupplier cond, long
sleepMillis, long timeoutMillis) throws InterruptedException {
long stop = System.currentTimeMillis() + timeoutMillis;