You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ti...@apache.org on 2025/08/13 09:54:53 UTC
(ignite) branch master updated: IGNITE-26047 Fix IgniteFutureImplTest#testChainAsync (#12228)
This is an automated email from the ASF dual-hosted git repository.
timoninmaxim 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 310092f9a47 IGNITE-26047 Fix IgniteFutureImplTest#testChainAsync (#12228)
310092f9a47 is described below
commit 310092f9a476c5b6062b0aa4bcfdc8b3dd78e30d
Author: Aleksandr Chesnokov <ch...@gmail.com>
AuthorDate: Wed Aug 13 12:54:47 2025 +0300
IGNITE-26047 Fix IgniteFutureImplTest#testChainAsync (#12228)
---
.../ignite/internal/util/future/IgniteFutureImplTest.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java
index 59ce0f72955..a48cfad83f3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/util/future/IgniteFutureImplTest.java
@@ -609,20 +609,24 @@ public class IgniteFutureImplTest extends GridCommonAbstractTest {
private final CountDownLatch latch;
/** */
- private TestClosure(CountDownLatch latch) {
+ private final String threadName;
+
+ /** */
+ private TestClosure(CountDownLatch latch, String threadName) {
this.latch = latch;
+ this.threadName = threadName;
}
/** {@inheritDoc} */
@Override public void apply(IgniteFuture<Integer> fut) {
- assertEquals(CUSTOM_THREAD_NAME, Thread.currentThread().getName());
+ assertEquals(threadName, Thread.currentThread().getName());
assertEquals(10, (int)fut.get());
latch.countDown();
}
}
- chained1.listen(new TestClosure(latch));
+ chained1.listen(new TestClosure(latch, CUSTOM_THREAD_NAME));
fut0.onDone("10");
@@ -646,14 +650,14 @@ public class IgniteFutureImplTest extends GridCommonAbstractTest {
IgniteFuture<Integer> chained2 = createFuture(ffut0).chainAsync(chainClos, customExec);
- chained2.listen(new TestClosure(latch1));
-
chained2.get(100, TimeUnit.MILLISECONDS);
assertTrue(chained2.isDone());
assertEquals(10, (int)chained2.get());
+ chained2.listen(new TestClosure(latch1, Thread.currentThread().getName()));
+
assert latch1.await(100, TimeUnit.MILLISECONDS);
}