ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/3] ignite git commit: Fixed query tests.
Date Thu, 12 Jan 2017 13:31:48 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-gg-11810 33616e06a -> 81ce9d55d


Fixed query tests.


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

Branch: refs/heads/ignite-gg-11810
Commit: fbf13d4c8d95462a7f67fe706cb93a6902d4d483
Parents: 79a546a
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Jan 12 16:20:33 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Jan 12 16:20:33 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/query/h2/database/H2TreeIndex.java   | 3 +--
 .../near/IgniteCachePartitionedFieldsQuerySelfTest.java      | 8 ++++----
 .../replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java | 6 +++---
 .../processors/query/h2/opt/GridH2TableSelfTest.java         | 6 ++----
 .../processors/query/h2/sql/GridQueryParsingTest.java        | 4 ++--
 5 files changed, 12 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fbf13d4c/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
index 31df27c..ef57834 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
@@ -87,8 +87,7 @@ public class H2TreeIndex extends GridH2IndexBase {
             tree = new H2Tree(name, cctx.offheap().reuseListForIndex(name), cctx.cacheId(),
                 dbMgr.pageMemory(), cctx.shared().wal(), cctx.offheap().globalRemoveId(),
                 tbl.rowFactory(), page.pageId().pageId(), page.isAllocated()) {
-                @Override
-                protected int compare(BPlusIO<SearchRow> io, ByteBuffer buf, int idx,
SearchRow row)
+                @Override protected int compare(BPlusIO<SearchRow> io, ByteBuffer buf,
int idx, SearchRow row)
                     throws IgniteCheckedException {
                     return compareRows(getRow(io, buf, idx), row);
                 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fbf13d4c/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 26f3191..4934255 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
@@ -62,20 +62,20 @@ public class IgniteCachePartitionedFieldsQuerySelfTest extends IgniteCacheAbstra
 
     /** @throws Exception If failed. */
     public void testLocalQuery() throws Exception {
-        IgniteCache<Object, Object> cache = grid(0).cache( null);
+        IgniteCache<Integer, Integer> cache = jcache(Integer.class, Integer.class);
 
         awaitPartitionMapExchange(true, true, null);
 
-        int expected = 0;
+        int exp = 0;
 
         for(Cache.Entry e: cache.localEntries(CachePeekMode.PRIMARY)){
             if(e.getValue() instanceof Integer)
-                expected++;
+                exp++;
         }
 
         QueryCursor<List<?>> qry = cache
             .query(new SqlFieldsQuery("select _key, _val from Integer").setLocal(true));
 
-        assertEquals(expected, qry.getAll().size());
+        assertEquals(exp, qry.getAll().size());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/fbf13d4c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java
index 4ec840c..953e5fa 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheReplicatedFieldsQuerySelfTest.java
@@ -48,13 +48,13 @@ public class IgniteCacheReplicatedFieldsQuerySelfTest extends IgniteCacheAbstrac
      * @throws Exception If failed.
      */
     public void testLostIterator() throws Exception {
-        IgniteCache<Object, Object> cache = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache = intCache;
 
         QueryCursor<List<?>> qry = null;
 
-        int maximumQueryIteratorCount = cache.getConfiguration(CacheConfiguration.class).getMaxQueryIteratorsCount();
+        int maximumQryIterCnt = cache.getConfiguration(CacheConfiguration.class).getMaxQueryIteratorsCount();
 
-        for (int i = 0; i < maximumQueryIteratorCount + 1; i++) {
+        for (int i = 0; i < maximumQryIterCnt + 1; i++) {
             QueryCursor<List<?>> q = cache
                 .query(new SqlFieldsQuery("select _key from Integer where _key >= 0 order
by _key"));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/fbf13d4c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
index 5daf415..72f186c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2TableSelfTest.java
@@ -27,16 +27,14 @@ import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Random;
 import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.ignite.*;
+import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.processors.query.h2.database.H2RowFactory;
-import org.apache.ignite.internal.util.lang.*;
+import org.apache.ignite.internal.util.lang.GridCursor;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.h2.Driver;

http://git-wip-us.apache.org/repos/asf/ignite/blob/fbf13d4c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 0992fe2..09a1884 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -383,10 +383,10 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
         checkQuery("update Person p set name='Peter', old = length('zzz') limit 20");
         checkQuery("update Person p set name=DEFAULT, old = null limit ?");
         checkQuery("update Person p set name=? where old >= ? and old < ? limit ?");
-        checkQuery("update Person p set name=(select a.Street from Address a where a.id=p.addrId),
old = (select 42)" +
+        checkQuery("update Person p set name=(select a.Street from \"addr\".Address a where
a.id=p.addrId), old = (select 42)" +
             " where old = sqrt(?)");
         checkQuery("update Person p set (name, old) = (select 'Peter', 42)");
-        checkQuery("update Person p set (name, old) = (select street, id from Address where
id > 5 and id <= ?)");
+        checkQuery("update Person p set (name, old) = (select street, id from \"addr\".Address
where id > 5 and id <= ?)");
     }
 
     /**


Mime
View raw message