Repository: ignite Updated Branches: refs/heads/ignite-gg-13543 660a63a90 -> 5eb1675c3
test Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/5eb1675c Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/5eb1675c Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/5eb1675c Branch: refs/heads/ignite-gg-13543 Commit: 5eb1675c36c4149d95416284e7707ff3b81008a8 Parents: 660a63a Author: sboikov <[email protected]> Authored: Thu Oct 11 17:21:42 2018 +0300 Committer: sboikov <[email protected]> Committed: Thu Oct 11 17:22:02 2018 +0300 ---------------------------------------------------------------------- .../CacheBalanceTxAndScanQueryRestartTest.java | 42 ++++++++++++++------ .../junits/multijvm/IgniteProcessProxy.java | 2 +- 2 files changed, 31 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb1675c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheBalanceTxAndScanQueryRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheBalanceTxAndScanQueryRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheBalanceTxAndScanQueryRestartTest.java index 889a025..ad50c97 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheBalanceTxAndScanQueryRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/CacheBalanceTxAndScanQueryRestartTest.java @@ -296,26 +296,44 @@ public class CacheBalanceTxAndScanQueryRestartTest extends GridCommonAbstractTes lock.writeLock().lock(); try { - List<IgniteFuture<Long>> futs = new ArrayList<>(); + for (int retry = 0; retry < 10; retry++) { + List<IgniteFuture<Long>> futs = new ArrayList<>(); - for (int i = 0; i < CACHES; i++) { - String cacheName = cacheName(i); + for (int i = 0; i < CACHES; i++) { + String cacheName = cacheName(i); - int parts = clientNode.affinity(cacheName).partitions(); + int parts = clientNode.affinity(cacheName).partitions(); - for (int p = 0; p < parts; p++) { - assertEquals(p, clientNode.affinity(cacheName).partition(p)); + for (int p = 0; p < parts; p++) { + assertEquals(p, clientNode.affinity(cacheName).partition(p)); - futs.add(clientNode.compute().affinityCallAsync(cacheName, p, new CacheSumTask(cacheName, p))); + futs.add(clientNode.compute().affinityCallAsync(cacheName, p, new CacheSumTask(cacheName, p))); + } } - } - long total = 0; + long total = 0; - for (IgniteFuture<Long> fut : futs) - total += fut.get(); + boolean err = false; - assertEquals(CACHES * KEYS * START_VAL, total); + for (IgniteFuture<Long> fut : futs) { + try { + total += fut.get(); + } + catch (Exception e) { + if (!err) { + err = true; + + info("AffinityCall error: " + e); + } + } + } + + if (!err) { + assertEquals(CACHES * KEYS * START_VAL, total); + + break; + } + } } finally { if (lock != null) http://git-wip-us.apache.org/repos/asf/ignite/blob/5eb1675c/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java index b6f7f89..9052275 100644 --- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java +++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteProcessProxy.java @@ -195,7 +195,7 @@ public class IgniteProcessProxy implements IgniteEx { ); if (locJvmGrid != null) - assert rmtNodeStartedLatch.await(30, TimeUnit.SECONDS): "Remote node has not joined [id=" + id + ']'; + assert rmtNodeStartedLatch.await(60, TimeUnit.SECONDS): "Remote node has not joined [id=" + id + ']'; IgniteProcessProxy prevVal = gridProxies.putIfAbsent(cfg.getIgniteInstanceName(), this);
