Repository: ignite
Updated Branches:
  refs/heads/master 9da69389e -> c141ded25


IGNITE-5984 - Test fix: scan for a test key only after late affinity assignment 
changes


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/c141ded2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/c141ded2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/c141ded2

Branch: refs/heads/master
Commit: c141ded2565b0b277add5007f73a6fa7e97b3372
Parents: 9da6938
Author: Alexey Goncharuk <alexey.goncha...@gmail.com>
Authored: Tue Aug 8 14:53:34 2017 +0300
Committer: Alexey Goncharuk <alexey.goncha...@gmail.com>
Committed: Tue Aug 8 14:53:34 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAbstractLocalStoreSelfTest.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c141ded2/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 ae9986d..328cde8 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
@@ -47,6 +47,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 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.processors.cache.store.CacheLocalStore;
 import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 import org.apache.ignite.internal.util.typedef.G;
@@ -294,6 +295,12 @@ public abstract class GridCacheAbstractLocalStoreSelfTest 
extends GridCommonAbst
 
         awaitPartitionMapExchange();
 
+        // We need a backup key on grid 1, so we must wait for late affinity 
assignment to change.
+        AffinityTopologyVersion waitTopVer = new AffinityTopologyVersion(2, 1);
+
+        
grid(1).context().cache().context().exchange().affinityReadyFuture(waitTopVer).get();
+        
grid(2).context().cache().context().exchange().affinityReadyFuture(waitTopVer).get();
+
         final String name = BACKUP_CACHE_2;
 
         int key1 = -1;

Reply via email to