You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2015/05/14 16:40:42 UTC

[15/26] incubator-ignite git commit: ignite-768 to be fixed test improved

ignite-768 to be fixed test improved


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

Branch: refs/heads/ignite-709_2
Commit: 87e5a3f9f81f5c06abaca66dce33c9f83e632f4d
Parents: 5f8925b
Author: avinogradov <av...@gridgain.com>
Authored: Wed May 13 18:56:08 2015 +0300
Committer: avinogradov <av...@gridgain.com>
Committed: Wed May 13 18:56:08 2015 +0300

----------------------------------------------------------------------
 .../GridCacheLocalIsolatedNodesSelfTest.java      | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/87e5a3f9/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java
index dbfdc86..ee42ddb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalIsolatedNodesSelfTest.java
@@ -40,7 +40,7 @@ public class GridCacheLocalIsolatedNodesSelfTest extends GridCommonAbstractTest
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
-        startGrids(2);
+        startGrids(3);
     }
 
     /** {@inheritDoc} */
@@ -59,7 +59,11 @@ public class GridCacheLocalIsolatedNodesSelfTest extends GridCommonAbstractTest
         Ignite g2 = grid(1);
         UUID nid2 = g2.cluster().localNode().id();
 
+        Ignite g3 = grid(2);
+        UUID nid3 = g3.cluster().localNode().id();
+
         assert !nid1.equals(nid2);
+        assert !nid1.equals(nid3);
 
         // Local cache on first node only.
         CacheConfiguration<String, String> ccfg1 = new CacheConfiguration<>("A");
@@ -77,8 +81,20 @@ public class GridCacheLocalIsolatedNodesSelfTest extends GridCommonAbstractTest
         IgniteCache<String, String> c2 = g2.createCache(ccfg2);
         c2.put("g2", "c2");
 
+        // Local cache on third node only.
+        CacheConfiguration<String, String> ccfg3 = new CacheConfiguration<>("A");
+        ccfg3.setCacheMode(LOCAL);
+        ccfg3.setNodeFilter(new NodeIdFilter(nid3));
+
+        IgniteCache<String, String> c3 = g3.createCache(ccfg3);
+        c3.put("g3", "c3");
+
         assertNull(c1.get("g2"));
+        assertNull(c1.get("g3"));
         assertNull(c2.get("g1"));
+        assertNull(c2.get("g3"));
+        assertNull(c3.get("g1"));
+        assertNull(c3.get("g2"));
     }
 
     /** Filter by node ID. */