You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/08/29 14:38:18 UTC
[04/16] ignite git commit: Fixed flaky test.
Fixed flaky test.
Signed-off-by: Andrey Gura <ag...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0647b034
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0647b034
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0647b034
Branch: refs/heads/master
Commit: 0647b034742e0ba8094a8436a37538fcf1b4fa70
Parents: 8169c60
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Tue Aug 22 14:10:10 2017 +0300
Committer: Andrey Gura <ag...@apache.org>
Committed: Tue Aug 29 17:32:04 2017 +0300
----------------------------------------------------------------------
.../cache/GridCacheAbstractLocalStoreSelfTest.java | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/0647b034/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
index 328cde8..ac3bddb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
@@ -48,9 +48,12 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
import org.apache.ignite.events.Event;
import org.apache.ignite.events.EventType;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.store.CacheLocalStore;
import org.apache.ignite.internal.util.lang.GridAbsPredicate;
import org.apache.ignite.internal.util.typedef.G;
+import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteBiInClosure;
import org.apache.ignite.lang.IgniteBiTuple;
@@ -290,7 +293,7 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
* @throws Exception If failed.
*/
public void testBackupRestore() throws Exception {
- Ignite ignite1 = startGrid(1);
+ final IgniteEx ignite1 = startGrid(1);
Ignite ignite2 = startGrid(2);
awaitPartitionMapExchange();
@@ -303,6 +306,18 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
final String name = BACKUP_CACHE_2;
+ assertTrue(GridTestUtils.waitForCondition(new GridAbsPredicate() {
+ @Override public boolean apply() {
+ AffinityTopologyVersion topVer = ignite1.context().cache().context().cacheContext(CU.cacheId(name))
+ .affinity().affinityTopologyVersion();
+
+ return topVer.topologyVersion() == 2 && topVer.minorTopologyVersion() == 1;
+
+// return ignite1.affinity(name).primaryPartitions(ignite1.cluster().localNode()).length <
+// ignite1.affinity(name).partitions();
+ }
+ }, 10_000));
+
int key1 = -1;
int key2 = -1;