ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: #ignite-565: Revert GridIndexingWithNoopSwapSelfTest.
Date Wed, 25 Mar 2015 12:36:08 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-565 a4567fa4f -> 57948af42


#ignite-565: Revert GridIndexingWithNoopSwapSelfTest.


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

Branch: refs/heads/ignite-565
Commit: 57948af4264e53185a13374a353682f116aea67e
Parents: a4567fa
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Wed Mar 25 15:36:00 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Wed Mar 25 15:36:00 2015 +0300

----------------------------------------------------------------------
 .../cache/GridIndexingWithNoopSwapSelfTest.java   | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/57948af4/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 c9019c7..0267379 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,9 +20,10 @@ 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.*;
@@ -90,19 +91,24 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest
{
 
     /** @throws Exception If failed. */
     public void testQuery() throws Exception {
-        IgniteCache<Integer, ObjectValue> cache = ignite.cache(null);
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).getCache(null);
 
         int cnt = 10;
 
         for (int i = 0; i < cnt; i++)
-            cache.put(i, new ObjectValue("test" + i, i));
+            cache.putx(i, new ObjectValue("test" + i, i));
 
         for (int i = 0; i < cnt; i++) {
-            assertNotNull(cache.localPeek(i));
+            assertNotNull(cache.peek(i));
 
-            cache.localEvict(Collections.singleton(i)); // Swap.
+            cache.evict(i); // Swap.
         }
 
-        assertEquals(0, cache.query(new SqlQuery(ObjectValue.class, "intVal >= ? order
by intVal")).getAll().size());
+        CacheQuery<Map.Entry<Integer, ObjectValue>> qry =
+            cache.queries().createSqlQuery(ObjectValue.class, "intVal >= ? order by intVal");
+
+        qry.enableDedup(true);
+
+        assertEquals(0, qry.execute(0).get().size());
     }
 }


Mime
View raw message