#ignite-333: Fix tests.

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

Branch: refs/heads/ignite-45
Commit: e13d9d5e89fbed7a8b2c6ed787f1c066943e9b39
Parents: bdf7634
Author: ivasilinets <ivasilin...@gridgain.com>
Authored: Thu Mar 12 20:18:03 2015 +0300
Committer: ivasilinets <ivasilin...@gridgain.com>
Committed: Thu Mar 12 20:18:03 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java       | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e13d9d5e/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 b15d7ae..7f3e223 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
@@ -4250,8 +4250,13 @@ public abstract class GridCacheAbstractFullApiSelfTest 
extends GridCacheAbstract
     protected void testGlobalClearKey(boolean async, Collection<String> 
keysToRemove) throws Exception {
         // Save entries only on their primary nodes. If we didn't do so, 
clearLocally() will not remove all entries
         // because some of them were blocked due to having readers.
-        for (int i = 0; i < 500; ++i)
-            grid(0).jcache(null).put("key" + i, "value" + i);
+        for (int i = 0; i < 500; ++i) {
+            String key = "key" + i;
+
+            Ignite g = primaryIgnite(key);
+
+            g.jcache(null).put(key, "value" + i);
+        }
 
         if (async) {
             IgniteCache<String, Integer> asyncCache = jcache().withAsync();
@@ -4276,12 +4281,9 @@ public abstract class GridCacheAbstractFullApiSelfTest 
extends GridCacheAbstract
             boolean found = false;
 
             for (int j = 0; j < gridCount(); j++)
-                if (jcache(j).localPeek(key) != null) {
+                if (jcache(j).localPeek(key) != null)
                     found = true;
 
-                    info("Found key " + key + " on node " + j);
-                }
-
             if (!keysToRemove.contains(key))
                 assertTrue("Not found key " + key, found);
             else

Reply via email to