ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [06/13] incubator-ignite git commit: # sprint-2 do not use old loadCache method
Date Wed, 18 Feb 2015 15:54:31 GMT
# sprint-2 do not use old loadCache method


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

Branch: refs/heads/ignite-223
Commit: 590908227402f81df68f65c342a46159d2231649
Parents: 2ef337c
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Feb 18 17:05:52 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Feb 18 17:05:52 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheQueryIndexSelfTest.java      |  4 +--
 .../cache/GridCacheQueryLoadSelfTest.java       | 30 +++++++++++++-------
 2 files changed, 21 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/59090822/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
index db38ec3..b2bcc04 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryIndexSelfTest.java
@@ -67,9 +67,9 @@ public class GridCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest
{
         for (int i = 0; i < ENTRY_CNT; i++)
             putToStore(i, new CacheValue(i));
 
-        GridCache<Integer, CacheValue> cache0 = ((IgniteKernal)grid(0)).cache(null);
+        grid(0).jcache(null).localLoadCache(null, 0);
 
-        cache0.loadCache(null, 0);
+        GridCache<Integer, CacheValue> cache0 = ((IgniteKernal)grid(0)).cache(null);
 
         checkCache(cache0);
         checkQuery(cache0, true);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/59090822/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
index cd1b6d6..01c8bf0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -112,9 +112,9 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testLoadCache() throws Exception {
-        GridCache<Integer, ValueObject> cache = cache();
+        grid().jcache(null).localLoadCache(null);
 
-        cache.loadCache(null, 0);
+        GridCache<Integer, ValueObject> cache = cache();
 
         assert cache.size() == PUT_CNT;
 
@@ -130,9 +130,13 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testLoadCacheAsync() throws Exception {
-        GridCache<Integer, ValueObject> cache = cache();
+        IgniteCache<Integer, ValueObject> asyncCache = grid().<Integer, ValueObject>jcache(null).withAsync();
+
+        asyncCache.localLoadCache(null);
 
-        cache.loadCacheAsync(null, 0).get();
+        asyncCache.future().get();
+
+        GridCache<Integer, ValueObject> cache = cache();
 
         assert cache.size() == PUT_CNT;
 
@@ -148,13 +152,13 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testLoadCacheFiltered() throws Exception {
-        GridCache<Integer, ValueObject> cache = cache();
-
-        cache.loadCache(new P2<Integer, ValueObject>() {
+        grid().<Integer, ValueObject>jcache(null).localLoadCache(new P2<Integer,
ValueObject>() {
             @Override public boolean apply(Integer key, ValueObject val) {
                 return key >= 5;
             }
-        }, 0);
+        });
+
+        GridCache<Integer, ValueObject> cache = cache();
 
         assert cache.size() == PUT_CNT - 5;
 
@@ -170,13 +174,17 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
      * @throws Exception If failed.
      */
     public void testLoadCacheAsyncFiltered() throws Exception {
-        GridCache<Integer, ValueObject> cache = cache();
+        IgniteCache<Integer, ValueObject> asyncCache = grid().<Integer, ValueObject>jcache(null).withAsync();
 
-        cache.loadCacheAsync(new P2<Integer, ValueObject>() {
+        asyncCache.loadCache(new P2<Integer, ValueObject>() {
             @Override public boolean apply(Integer key, ValueObject val) {
                 return key >= 5;
             }
-        }, 0).get();
+        });
+
+        asyncCache.future().get();
+
+        GridCache<Integer, ValueObject> cache = cache();
 
         assert cache.size() == PUT_CNT - 5;
 


Mime
View raw message