ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [37/51] [abbrv] ignite git commit: ignite-1.9 - test added
Date Thu, 23 Mar 2017 07:16:12 GMT
ignite-1.9 - test added


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

Branch: refs/heads/ignite-4829
Commit: 067cf8a23d06acda873ac73d8f99f30eba9abb12
Parents: 827befb
Author: Sergi Vladykin <sergi.vladykin@gmail.com>
Authored: Sat Mar 18 14:46:00 2017 +0300
Committer: Sergi Vladykin <sergi.vladykin@gmail.com>
Committed: Wed Mar 22 12:11:22 2017 +0300

----------------------------------------------------------------------
 .../query/IgniteSqlSplitterSelfTest.java        | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/067cf8a2/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
index b7d5bab..9dd12e1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java
@@ -153,6 +153,34 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
+     *
+     */
+    public void testReplicatedOnlyTables() {
+        IgniteCache<Integer,Value> p = ignite(0).getOrCreateCache(cacheConfig("p",
true,
+            Integer.class, Value.class));
+        IgniteCache<Integer,Value> r = ignite(0).getOrCreateCache(cacheConfig("r",
false,
+            Integer.class, Value.class));
+
+        try {
+            int cnt = 1000;
+
+            for (int i = 0; i < cnt; i++)
+                r.put(i, new Value(i, -i));
+
+            // Query data from replicated table using partitioned cache.
+            assertEquals(cnt, p.query(new SqlFieldsQuery("select 1 from \"r\".Value")).getAll().size());
+
+            List<List<?>> res = p.query(new SqlFieldsQuery("select count(1) from
\"r\".Value")).getAll();
+            assertEquals(1, res.size());
+            assertEquals(cnt, ((Number)res.get(0).get(0)).intValue());
+        }
+        finally {
+            p.destroy();
+            r.destroy();
+        }
+    }
+
+    /**
      * @throws Exception If failed.
      */
     public void testSortedMergeIndex() throws Exception {


Mime
View raw message