You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/04/23 17:57:06 UTC
[2/2] ignite git commit: FIxing tests.
FIxing tests.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/96cc54ce
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/96cc54ce
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/96cc54ce
Branch: refs/heads/ignite-2523-1
Commit: 96cc54ce86ace70701d002897c9ad268cc08b79a
Parents: d4833d3
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Sat Apr 23 18:56:12 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Sat Apr 23 18:56:12 2016 +0300
----------------------------------------------------------------------
...niteCacheClientNodeChangingTopologyTest.java | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/96cc54ce/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
index ce883b0..fe9f1d7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodeChangingTopologyTest.java
@@ -61,6 +61,8 @@ import org.apache.ignite.internal.processors.affinity.GridAffinityFunctionContex
import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
import org.apache.ignite.internal.processors.cache.GridCacheAffinityManager;
import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
+import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateRequest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicSingleUpdateRequest;
import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicUpdateRequest;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheEntry;
@@ -231,7 +233,10 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
// Block messages requests for both nodes.
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite0.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite0.localNode().id());
+
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite1.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite1.localNode().id());
final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
@@ -273,6 +278,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
// Block messages requests for single node.
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite0.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite0.localNode().id());
putFut = GridTestUtils.runAsync(new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -362,10 +368,15 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
// Block messages requests for both nodes.
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite0.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite0.localNode().id());
+
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite1.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite1.localNode().id());
+
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite2.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite2.localNode().id());
- spi.record(GridNearAtomicUpdateRequest.class);
+ spi.record(GridNearAtomicAbstractUpdateRequest.class);
final IgniteCache<Integer, Integer> cache = ignite3.cache(null);
@@ -402,7 +413,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
assertEquals(3, msgs.size());
for (Object msg : msgs)
- assertTrue(((GridNearAtomicUpdateRequest)msg).clientRequest());
+ assertTrue(((GridNearAtomicAbstractUpdateRequest)msg).clientRequest());
map.put(primaryKey(ignite0.cache(null)), 3);
map.put(primaryKey(ignite1.cache(null)), 4);
@@ -460,7 +471,10 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
// Block messages requests for both nodes.
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite0.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite0.localNode().id());
+
spi.blockMessages(GridNearAtomicUpdateRequest.class, ignite1.localNode().id());
+ spi.blockMessages(GridNearAtomicSingleUpdateRequest.class, ignite1.localNode().id());
final IgniteCache<Integer, Integer> cache = ignite2.cache(null);
@@ -2042,7 +2056,7 @@ public class IgniteCacheClientNodeChangingTopologyTest extends GridCommonAbstrac
Object msg0 = ((GridIoMessage)msg).message();
synchronized (this) {
- if (recordCls != null && msg0.getClass().equals(recordCls))
+ if (recordCls != null && recordCls.isAssignableFrom(msg0.getClass()))
recordedMsgs.add(msg0);
Set<UUID> blockNodes = blockCls.get(msg0.getClass());