ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/50] [abbrv] ignite git commit: Fixed tests for IGNITE-4379 commit.
Date Thu, 22 Dec 2016 15:15:46 GMT
Fixed tests for IGNITE-4379 commit.


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

Branch: refs/heads/master
Commit: 6fd8bf6338470275e687a686044c7d935d3714ff
Parents: 6e48563
Author: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Authored: Wed Dec 7 18:49:06 2016 +0300
Committer: Andrey V. Mashenkov <andrey.mashenkov@gmail.com>
Committed: Fri Dec 9 15:56:21 2016 +0300

----------------------------------------------------------------------
 .../IgniteCacheAbstractFieldsQuerySelfTest.java | 19 ---------------
 ...niteCachePartitionedFieldsQuerySelfTest.java | 25 ++++++++++++++++++++
 2 files changed, 25 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6fd8bf63/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
index 2c35501..d5f02eb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractFieldsQuerySelfTest.java
@@ -28,12 +28,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.Callable;
-import javax.cache.Cache;
 import javax.cache.CacheException;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.affinity.AffinityKey;
@@ -652,23 +650,6 @@ public abstract class IgniteCacheAbstractFieldsQuerySelfTest extends
GridCommonA
     }
 
     /** @throws Exception If failed. */
-    public void testLocalQuery() throws Exception {
-        IgniteCache<Object, Object> cache = grid(0).cache( null);
-
-        int expected = 0;
-
-        for(Cache.Entry e: cache.localEntries(CachePeekMode.PRIMARY)){
-            if(e.getValue() instanceof Integer)
-                expected++;
-        }
-
-        QueryCursor<List<?>> qry = cache
-            .query(new SqlFieldsQuery("select _key, _val from Integer").setLocal(true));
-
-        assertEquals(expected, qry.getAll().size());
-    }
-
-    /** @throws Exception If failed. */
     public void testQueryIntegersWithJoin() throws Exception {
         QueryCursor<List<?>> qry = grid(0).cache(null).query(new SqlFieldsQuery(
             "select i._KEY, i._VAL, j._KEY, j._VAL from Integer i join Integer j where i._VAL
>= 100"));

http://git-wip-us.apache.org/repos/asf/ignite/blob/6fd8bf63/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java
index 653947e..af5845d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCachePartitionedFieldsQuerySelfTest.java
@@ -17,7 +17,13 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.near;
 
+import java.util.List;
+import javax.cache.Cache;
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractFieldsQuerySelfTest;
@@ -54,4 +60,23 @@ public class IgniteCachePartitionedFieldsQuerySelfTest extends IgniteCacheAbstra
 
         return cc;
     }
+
+    /** @throws Exception If failed. */
+    public void testLocalQuery() throws Exception {
+        IgniteCache<Object, Object> cache = grid(0).cache( null);
+
+        awaitPartitionMapExchange(true, true, null);
+
+        int expected = 0;
+
+        for(Cache.Entry e: cache.localEntries(CachePeekMode.PRIMARY)){
+            if(e.getValue() instanceof Integer)
+                expected++;
+        }
+
+        QueryCursor<List<?>> qry = cache
+            .query(new SqlFieldsQuery("select _key, _val from Integer").setLocal(true));
+
+        assertEquals(expected, qry.getAll().size());
+    }
 }
\ No newline at end of file


Mime
View raw message