ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [08/39] incubator-ignite git commit: #ignite-738: GridIndexingWithNoopSwapSelfTest uses new query API.
Date Thu, 16 Apr 2015 17:36:58 GMT
#ignite-738: GridIndexingWithNoopSwapSelfTest uses new query API.


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

Branch: refs/heads/ignite-485
Commit: 4dd76db661f482d36a11dfc3dc98cbf34684ac9c
Parents: b68aa1c
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Mon Apr 13 17:16:11 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Mon Apr 13 17:16:11 2015 +0300

----------------------------------------------------------------------
 .../cache/GridIndexingWithNoopSwapSelfTest.java    | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4dd76db6/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index a24ef68..2c0962b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -20,10 +20,9 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.fifo.*;
+import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractQuerySelfTest.*;
-import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -91,7 +90,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest
{
 
     /** @throws Exception If failed. */
     public void testQuery() throws Exception {
-        GridCacheAdapter<Integer, ObjectValue> cache = ((IgniteKernal)ignite).internalCache(null);
+        IgniteCache<Integer, ObjectValue> cache = ignite.cache(null);
 
         int cnt = 10;
 
@@ -99,16 +98,14 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest
{
             cache.getAndPut(i, new ObjectValue("test" + i, i));
 
         for (int i = 0; i < cnt; i++) {
-            assertNotNull(localPeek(cache, i));
+            assertNotNull(cache.localPeek(i, ONHEAP_PEEK_MODES));
 
-            cache.evictAll(Collections.singleton(i)); // Swap.
+            cache.localEvict(Collections.singleton(i)); // Swap.
         }
 
-        CacheQuery<Map.Entry<Integer, ObjectValue>> qry =
-            cache.queries().createSqlQuery(ObjectValue.class, "intVal >= ? order by intVal");
+        SqlQuery<Integer, ObjectValue> qry =
+            new SqlQuery(ObjectValue.class, "intVal >= ? order by intVal");
 
-        qry.enableDedup(true);
-
-        assertEquals(0, qry.execute(0).get().size());
+        assertEquals(0, cache.query(qry.setArgs(0)).getAll().size());
     }
 }


Mime
View raw message