ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [37/51] [abbrv] incubator-ignite git commit: # IGNITE-203: Implemented "randomEntry".
Date Tue, 10 Feb 2015 08:17:01 GMT
# IGNITE-203: Implemented "randomEntry".


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

Branch: refs/heads/ignite-96-tests
Commit: 14efbcaa0af2e958c664fc4aec5fdbaab70d49fb
Parents: cefab8b
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Feb 9 16:58:55 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Feb 9 16:58:55 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/IgniteCacheProxy.java       | 10 ++++++++--
 .../GridCacheEntrySetIterationPreloadingSelfTest.java     |  3 +--
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/14efbcaa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index a179297..00b0899 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -132,8 +132,14 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
     /** {@inheritDoc} */
     @Nullable @Override public Entry<K, V> randomEntry() {
-        // TODO: IGNITE-203 (enable GridCacheEntrySetIterationPreloadingSelfTest._testIteration
when fixed).
-        throw new UnsupportedOperationException();
+        GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
+
+        try {
+            return ctx.cache().randomEntry();
+        }
+        finally {
+            gate.leave(prev);
+        }
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/14efbcaa/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java
index 21276b8..6433e0a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java
@@ -60,8 +60,7 @@ public class GridCacheEntrySetIterationPreloadingSelfTest extends GridCacheAbstr
     /**
      * @throws Exception If failed.
      */
-    // TODO: IGNITE-203: Enable when implemented.
-    public void _testIteration()  throws Exception {
+    public void testIteration()  throws Exception {
         try {
             final IgniteCache<String, Integer> cache = jcache();
 


Mime
View raw message