#ignite-333: Add check for that localClear does not clear remote nodes.

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

Branch: refs/heads/ignite-45
Commit: 2442881a2d540f476261b1d3869cbaed7c534508
Parents: ada5881
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Fri Mar 13 13:00:00 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Fri Mar 13 13:00:00 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java           | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2442881a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index d411fab..ece20a5 100644
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ 
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -4111,8 +4111,16 @@ public abstract class GridCacheAbstractFullApiSelfTest 
extends GridCacheAbstract
 
             boolean found = primaryIgnite(key).jcache(null).localPeek(key) != 
null;
 
-            if (keyToRemove.equals(key))
+            if (keyToRemove.equals(key)) {
+                Collection<ClusterNode> nodes 
=grid(0).affinity(null).mapKeyToPrimaryAndBackups(key);
+
+                for (int j = 0; j < gridCount(); ++j) {
+                    if (nodes.contains(grid(j).localNode()) && grid(j) != 
primaryIgnite(key))
+                        assertTrue("Not found on backup removed key ", 
grid(j).jcache(null).localPeek(key) != null);
+                }
+
                 assertFalse("Found removed key " + key, found);
+            }
             else
                 assertTrue("Not found key " + key, found);
         }

Reply via email to