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/10 13:53:13 UTC
[16/30] ignite git commit: IGNITE-5984 - Test fix: scan for a test
key only after late affinity assignment changes
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/ignite-5872
Commit: c141ded2565b0b277add5007f73a6fa7e97b3372
Parents: 9da6938
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Aug 8 14:53:34 2017 +0300
Committer: Alexey Goncharuk <al...@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;