ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject incubator-ignite git commit: ignite-96 wip (fixing test)
Date Sat, 07 Feb 2015 15:52:17 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-96 1a6422ff7 -> 8569d3e0e


ignite-96 wip (fixing test)


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

Branch: refs/heads/ignite-96
Commit: 8569d3e0e521f44eddda609d0898529f4c69d1a4
Parents: 1a6422f
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Sat Feb 7 18:52:07 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Sat Feb 7 18:52:07 2015 +0300

----------------------------------------------------------------------
 .../cache/distributed/near/GridNearCacheAdapter.java  |  7 +++++++
 .../cache/GridCacheAbstractFullApiSelfTest.java       | 14 ++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8569d3e0/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index c6c844e..77d83a5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -475,6 +475,13 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
         return super.compact(key, filter) | dht().compact(key, filter);
     }
 
+    /** {@inheritDoc} */
+    @Override public Cache.Entry<K, V> entry(K key) {
+        // We don't try wrap entry from near or dht cache.
+        // Created object will be wrapped once some method is called.
+        return new CacheEntryImpl<>(key, null);
+    }
+
     /**
      * Peeks only near cache without looking into DHT cache.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/8569d3e0/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 1ff1953..b040291 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
@@ -3691,7 +3691,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     /**
      * @param key Key.
      * @return Cache.
-     * @throws Exception If failed.
      */
     protected IgniteCache<String, Integer> primaryCache(String key) {
         return primaryIgnite(key).jcache(null);
@@ -3722,13 +3721,12 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         for (int i = startFrom; i < startFrom + 100_000; i++) {
             String key = "key" + i;
 
-            assert false;
-//            if (cache.entry(key).primary()) {
-//                found.add(key);
-//
-//                if (found.size() == cnt)
-//                    return found;
-//            }
+            if (cache.cache().affinity().isPrimary(cache.gridProjection().ignite().cluster().localNode(),
i)) {
+                found.add(key);
+
+                if (found.size() == cnt)
+                    return found;
+            }
         }
 
         throw new IgniteCheckedException("Unable to find " + cnt + " keys as primary for
cache.");


Mime
View raw message