ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-648: fix the rest of tests
Date Tue, 23 Jun 2015 19:57:54 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-648 0ffe95f60 -> f1e270e4b


# ignite-648: fix the rest of 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/f1e270e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f1e270e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f1e270e4

Branch: refs/heads/ignite-648
Commit: f1e270e4b91a37fef24977a2ffc2dab28e919cca
Parents: 0ffe95f
Author: ashutak <ashutak@gridgain.com>
Authored: Tue Jun 23 22:58:16 2015 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Tue Jun 23 22:58:16 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractFullApiSelfTest.java | 14 ++++++++------
 .../multijvm/IgniteCacheProcessProxy.java       | 20 +++++++++-----------
 2 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1e270e4/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 e896b55..bb2b03d 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
@@ -2342,13 +2342,15 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
             grid(g).cache(null).localLoadCache(null);
 
         for (int g = 0; g < gridCount(); g++) {
-            for (int i = 0; i < cnt; i++) {
-                String key = String.valueOf(i);
+            if (!isMultiJvmAndNodeIsRemote(g)) {
+                for (int i = 0; i < cnt; i++) {
+                    String key = String.valueOf(i);
 
-                if (grid(0).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
-                    assertEquals((Integer)i, peek(jcache(g), key));
-                else
-                    assertNull(peek(jcache(g), key));
+                    if (grid(0).affinity(null).mapKeyToPrimaryAndBackups(key).contains(grid(g).localNode()))
+                        assertEquals((Integer)i, peek(jcache(g), key));
+                    else
+                        assertNull(peek(jcache(g), key));
+                }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f1e270e4/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
index d4dccab..d5ef32b 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
+import org.apache.ignite.internal.util.future.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.mxbean.*;
 import org.jetbrains.annotations.*;
@@ -86,16 +87,8 @@ public class IgniteCacheProcessProxy<K, V> implements IgniteCache<K,
V> {
 
     /** {@inheritDoc} */
     @Override public <R> IgniteFuture<R> future() {
-        // TODO implement.
-//        R futureRes = (R)compute.call(new IgniteCallable<Object>() {
-//            @Override public Object call() throws Exception {
-//                return cache().future().get();
-//            }
-//        });
-//
-//        return new IgniteFinishedFutureImpl<R>(futureRes);
-
-        throw new UnsupportedOperationException("Method should be supported.");
+        // Return fake future. Future should be called in the same place where operation
done.
+        return new IgniteFinishedFutureImpl<>();
     }
 
     /** {@inheritDoc} */
@@ -402,7 +395,12 @@ public class IgniteCacheProcessProxy<K, V> implements IgniteCache<K,
V> {
     @Override public void removeAll() {
         compute.run(new IgniteRunnable() {
             @Override public void run() {
-                cache().removeAll();
+                IgniteCache<Object, Object> cache = cache();
+
+                cache.removeAll();
+
+                if(isAsync)
+                    cache.future().get();
             }
         });
     }


Mime
View raw message