ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/8] incubator-ignite git commit: # ignite-648: fix test + internalCache unsupported msg
Date Thu, 02 Jul 2015 17:40:51 GMT
# ignite-648: fix test + internalCache unsupported msg


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

Branch: refs/heads/ignite-648-failover
Commit: 84c7d61928770473992d57c6f4f0d35a22987289
Parents: 04aaa6e
Author: ashutak <ashutak@gridgain.com>
Authored: Wed Jul 1 19:16:28 2015 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Wed Jul 1 19:16:28 2015 +0300

----------------------------------------------------------------------
 .../testframework/junits/common/GridCommonAbstractTest.java  | 4 ++++
 .../junits/multijvm/IgniteCacheProcessProxy.java             | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/84c7d619/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index 01cb240..4764de0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -117,6 +117,10 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest
{
      * @return Cache.
      */
     protected <K, V> GridCacheAdapter<K, V> internalCache(IgniteCache<K, V>
cache) {
+        if (cache instanceof IgniteCacheProcessProxy)
+            throw new UnsupportedOperationException("Oparetion can't be supported automatically
for multi jvm " +
+                "(send closure instead).");
+
         return ((IgniteKernal)cache.unwrap(Ignite.class)).internalCache(cache.getName());
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/84c7d619/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 e23739d..07ed950 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
@@ -168,8 +168,12 @@ public class IgniteCacheProcessProxy<K, V> implements IgniteCache<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public boolean isLocalLocked(K key, boolean byCurrThread) {
-        throw new UnsupportedOperationException("Method should be supported.");
+    @Override public boolean isLocalLocked(final K key, final boolean byCurrThread) {
+        return compute.call(new IgniteCallable<Boolean>() {
+            @Override public Boolean call() throws Exception {
+                return cache().isLocalLocked(key, byCurrThread);
+            }
+        });
     }
 
     /** {@inheritDoc} */


Mime
View raw message