ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [2/4] incubator-ignite git commit: Sprint-2 - Restored original client projection behavior.
Date Fri, 27 Mar 2015 00:01:28 GMT
Sprint-2 - Restored original client projection behavior.


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

Branch: refs/heads/ignite-341
Commit: b87d4ef5ff4154efc26200d1f7abdab66dbef442
Parents: 676a568
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Thu Mar 26 16:53:14 2015 -0700
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Thu Mar 26 16:53:14 2015 -0700

----------------------------------------------------------------------
 .../internal/managers/discovery/GridDiscoveryManager.java     | 7 ++++++-
 .../ignite/internal/GridProjectionForCachesSelfTest.java      | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b87d4ef5/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index c4633c3..04ff423 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1207,6 +1207,11 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
         return predicate != null && predicate.nearNode(node);
     }
 
+    /**
+     * @param node Node to check.
+     * @param cacheName Cache name.
+     * @return {@code True} if node has client cache (without near cache).
+     */
     public boolean cacheClientNode(ClusterNode node, String cacheName) {
         CachePredicate predicate = registeredCaches.get(cacheName);
 
@@ -2457,7 +2462,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
             Boolean near = clientNodes.get(node.id());
 
-            return near == null || !near;
+            return near != null && !near;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/b87d4ef5/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java
index a12435e..62d301a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java
@@ -122,7 +122,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest
{
         ClusterGroup prj = ignite.cluster().forCacheNodes(null);
 
         assert prj != null;
-        assert prj.nodes().size() == 3;
+        assertEquals(3, prj.nodes().size());
         assert prj.nodes().contains(grid(0).localNode());
         assert !prj.nodes().contains(grid(1).localNode());
         assert prj.nodes().contains(grid(2).localNode());


Mime
View raw message