ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [17/50] incubator-ignite git commit: #ignite-237: fix ClientAbstractMultiThreadedSelfTest.
Date Tue, 03 Mar 2015 20:28:21 GMT
#ignite-237: fix ClientAbstractMultiThreadedSelfTest.


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

Branch: refs/heads/ignite-141
Commit: 120711b2f8e81634f11b762d3c8f7f0f8aafd18c
Parents: 31180aa
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Feb 27 12:51:07 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Feb 27 12:51:07 2015 +0300

----------------------------------------------------------------------
 .../ClientAbstractMultiThreadedSelfTest.java    | 34 +++-----------------
 1 file changed, 5 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/120711b2/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java
index 4ab2679..079b3ec 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/client/ClientAbstractMultiThreadedSelfTest.java
@@ -426,19 +426,6 @@ public abstract class ClientAbstractMultiThreadedSelfTest extends GridCommonAbst
                         String key = String.valueOf(rawKey);
 
                         UUID nodeId = cache.affinity(key);
-                        UUID srvNodeId = ignite.cluster().mapKeyToNode(PARTITIONED_CACHE_NAME,
key).id();
-
-                        if (!nodeId.equals(srvNodeId)) {
-                            //GridClientDataAffinity clAff =
-                            //    ((GridClientConfiguration)getFieldValue(client, "cfg")).
-                            //        getDataConfiguration(PARTITIONED_CACHE_NAME).getAffinity();
-
-                            //printAffinityState(gridMap.values());
-                            //info("Client affinity: " + clAff);
-
-                            info("Got wrong client mapping [key=" + key + ", exp=" + srvNodeId
+
-                                ", actual=" + nodeId + "]");
-                        }
 
                         String val = "val" + rawKey;
 
@@ -475,25 +462,14 @@ public abstract class ClientAbstractMultiThreadedSelfTest extends GridCommonAbst
                     puts.get(key).get2(), gridMap.get(node.id()).jcache(PARTITIONED_CACHE_NAME).localPeek(key,
CachePeekMode.ONHEAP));
             }
 
-            // Assert that client has properly determined affinity node.
-            if (!node.id().equals(puts.get(key).get1())) {
-                //GridClientDataAffinity clAff =
-                //    ((GridClientConfiguration)getFieldValue(client, "cfg")).
-                //        getDataConfiguration(PARTITIONED_CACHE_NAME).getAffinity();
 
-                //printAffinityState(gridMap.values());
-                //info("Client affinity: " + clAff);
-
-                UUID curAffNode = client.data(PARTITIONED_CACHE_NAME).affinity(key);
-
-                failNotEquals(
-                    "Got different mappings [key=" + key + ", currId=" + curAffNode + "]",
-                    node.id(), puts.get(key).get1());
-            }
+            UUID curAffNode = client.data(PARTITIONED_CACHE_NAME).affinity(key);
 
             // Check that no other nodes see this key.
-            for (UUID id : F.view(gridMap.keySet(), F.notEqualTo(node.id())))
-                assertNull("Got value in near cache.", gridMap.get(id).jcache(PARTITIONED_CACHE_NAME).localPeek(key,
CachePeekMode.ONHEAP));
+            for (UUID id : gridMap.keySet()) {
+                if (!id.equals(curAffNode) && !id.equals(node.id()))
+                    assertNull("Got value in near cache.", gridMap.get(id).jcache(PARTITIONED_CACHE_NAME).localPeek(key,
CachePeekMode.ONHEAP));
+            }
         }
 
         for (Ignite g : gridMap.values())


Mime
View raw message