This is an automated email from the ASF dual-hosted git repository.
zstan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 10800f70314 IGNITE-28049 Fix
DurableBackgroundTasksProcessorSelfTest#testConvertAfterRestoreIfNeeded (#12848)
10800f70314 is described below
commit 10800f703145d842b6da2786baa42e3a6d323066
Author: Aleksandr Chesnokov <[email protected]>
AuthorDate: Fri Mar 6 15:10:48 2026 +0300
IGNITE-28049 Fix
DurableBackgroundTasksProcessorSelfTest#testConvertAfterRestoreIfNeeded (#12848)
---
.../localtask/DurableBackgroundTasksProcessorSelfTest.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/modules/core/src/test/java/org/apache/ignite/internal/processors/localtask/DurableBackgroundTasksProcessorSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/localtask/DurableBackgroundTasksProcessorSelfTest.java
index 8c1df0ee6a5..6007b079094 100644
---
a/modules/core/src/test/java/org/apache/ignite/internal/processors/localtask/DurableBackgroundTasksProcessorSelfTest.java
+++
b/modules/core/src/test/java/org/apache/ignite/internal/processors/localtask/DurableBackgroundTasksProcessorSelfTest.java
@@ -49,6 +49,7 @@ import static
org.apache.ignite.internal.processors.localtask.DurableBackgroundT
import static org.apache.ignite.testframework.GridTestUtils.assertThrows;
import static org.apache.ignite.testframework.GridTestUtils.getFieldValue;
import static org.apache.ignite.testframework.GridTestUtils.runAsync;
+import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
/**
* Class for testing the {@link DurableBackgroundTasksProcessor}.
@@ -345,7 +346,10 @@ public class DurableBackgroundTasksProcessorSelfTest
extends GridCommonAbstractT
n = startGrid(0);
- assertEquals(3, tasks(n).size());
+ int tasks = tasks(n).size();
+
+ assertTrue("Expected 3 tasks after restore, or 2 if completed
converted task was already cleaned by checkpoint",
+ tasks == 2 || tasks == 3);
checkStateAndMetaStorage(n, t0, COMPLETED, true, true, false);
checkStateAndMetaStorage(n, t1, INIT, true, false, false);
@@ -535,7 +539,7 @@ public class DurableBackgroundTasksProcessorSelfTest
extends GridCommonAbstractT
if (expState == null)
assertNull(taskState);
else {
- assertEquals(expState, taskState.state());
+ assertTrue(waitForCondition(() -> expState == taskState.state(),
1_000));
assertEquals(expSaved, taskState.saved());
assertEquals(expDone, taskState.outFuture().isDone());