ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [6/9] ignite git commit: IGNITE-2455 - Test for custom schema name
Date Mon, 29 Feb 2016 06:48:54 GMT
IGNITE-2455 - Test for custom schema name


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

Branch: refs/heads/ignite-1232
Commit: 436c17eb740ede2e6a86bdc8c0cda0cadb6975e7
Parents: affe6e7
Author: Valentin Kulichenko <valentin.kulichenko@gmail.com>
Authored: Sun Feb 28 12:21:57 2016 -0800
Committer: Valentin Kulichenko <valentin.kulichenko@gmail.com>
Committed: Sun Feb 28 12:21:57 2016 -0800

----------------------------------------------------------------------
 .../cache/CacheQueryNewClientSelfTest.java      | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/436c17eb/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java
index 020dddd..6e7a038 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryNewClientSelfTest.java
@@ -77,4 +77,32 @@ public class CacheQueryNewClientSelfTest extends GridCommonAbstractTest
{
 
         assertEquals(100, res.size());
     }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testQueryFromNewClientCustomSchemaName() throws Exception {
+        Ignite server = startGrid("server");
+
+        IgniteCache<Integer, Integer> cache1 = server.createCache(new CacheConfiguration<Integer,
Integer>().
+            setName("cache1").setSqlSchema("cache1_sql").setIndexedTypes(Integer.class, Integer.class));
+        IgniteCache<Integer, Integer> cache2 = server.createCache(new CacheConfiguration<Integer,
Integer>().
+            setName("cache2").setSqlSchema("cache2_sql").setIndexedTypes(Integer.class, Integer.class));
+
+        for (int i = 0; i < 10; i++) {
+            cache1.put(i, i);
+            cache2.put(i, i);
+        }
+
+        Ignition.setClientMode(true);
+
+        Ignite client = startGrid("client");
+
+        IgniteCache<Integer, Integer> cache = client.cache("cache1");
+
+        List<List<?>> res = cache.query(new SqlFieldsQuery(
+            "select i1._val, i2._val from Integer i1 cross join cache2_sql.Integer i2")).getAll();
+
+        assertEquals(100, res.size());
+    }
 }


Mime
View raw message