ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [41/50] [abbrv] incubator-ignite git commit: ignite-sql-tests - tests
Date Fri, 27 Feb 2015 06:43:40 GMT
ignite-sql-tests - tests


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

Branch: refs/heads/ignite-sql-tests
Commit: 83108458128c4e5161332e2a62e2cdf1a96c01cd
Parents: 566287a
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Thu Feb 26 17:24:39 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Thu Feb 26 17:24:39 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java  | 10 ++++++----
 .../org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java    |  2 +-
 .../org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java   |  3 +++
 .../java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java |  8 +++++---
 .../apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java |  7 ++++---
 .../org/apache/ignite/jdbc/JdbcResultSetSelfTest.java     |  9 +++++----
 .../org/apache/ignite/jdbc/JdbcStatementSelfTest.java     |  9 +++++----
 .../processors/cache/GridCacheOffHeapSelfTest.java        |  7 ++++---
 .../processors/cache/GridCacheOffHeapAndSwapSelfTest.java |  5 ++++-
 .../cache/GridIndexingWithNoopSwapSelfTest.java           |  5 ++++-
 .../processors/cache/IgniteCacheQueryIndexSelfTest.java   |  2 ++
 .../processors/query/h2/GridH2IndexRebuildTest.java       |  9 ++++++++-
 modules/scalar/src/test/resources/spring-cache.xml        |  6 ++++++
 13 files changed, 57 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
index e5ae5d1..e52d0f4 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcComplexQuerySelfTest.java
@@ -17,10 +17,8 @@
 
 package org.apache.ignite.jdbc;
 
-import org.apache.ignite.IgniteCache;
+import org.apache.ignite.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
-import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -54,13 +52,17 @@ public class JdbcComplexQuerySelfTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        CacheConfiguration cache = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cache = defaultCacheConfiguration();
 
         cache.setCacheMode(PARTITIONED);
         cache.setBackups(1);
         cache.setWriteSynchronizationMode(FULL_SYNC);
         cache.setDistributionMode(NEAR_PARTITIONED);
         cache.setAtomicityMode(TRANSACTIONAL);
+        cache.setIndexedTypes(
+            String.class, Organization.class,
+            CacheAffinityKey.class, Person.class
+        );
 
         cfg.setCacheConfiguration(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java
index 41e619c..9742999 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcEmptyCacheSelfTest.java
@@ -119,7 +119,7 @@ public class JdbcEmptyCacheSelfTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    public void _testSelectString() throws Exception {
+    public void testSelectString() throws Exception {
         ResultSet rs = stmt.executeQuery("select 'str'");
 
         int cnt = 0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
index e521928..6818908 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcLocalCachesSelfTest.java
@@ -53,6 +53,9 @@ public class JdbcLocalCachesSelfTest extends GridCommonAbstractTest {
         cache.setName(CACHE_NAME);
         cache.setCacheMode(LOCAL);
         cache.setWriteSynchronizationMode(FULL_SYNC);
+        cache.setIndexedTypes(
+            String.class, Integer.class
+        );
 
         cfg.setCacheConfiguration(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
index c92ce88..2ae3a9c 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcMetadataSelfTest.java
@@ -19,8 +19,6 @@ package org.apache.ignite.jdbc;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.affinity.*;
-import org.apache.ignite.cache.query.*;
-import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -51,11 +49,15 @@ public class JdbcMetadataSelfTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        CacheConfiguration cache = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cache = defaultCacheConfiguration();
 
         cache.setCacheMode(PARTITIONED);
         cache.setBackups(1);
         cache.setWriteSynchronizationMode(FULL_SYNC);
+        cache.setIndexedTypes(
+            String.class, Organization.class,
+            CacheAffinityKey.class, Person.class
+        );
 
         cfg.setCacheConfiguration(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
index fc40461..700d707 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcPreparedStatementSelfTest.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.jdbc;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.query.*;
-import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -57,11 +55,14 @@ public class JdbcPreparedStatementSelfTest extends GridCommonAbstractTest
{
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        CacheConfiguration cache = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cache = defaultCacheConfiguration();
 
         cache.setCacheMode(PARTITIONED);
         cache.setBackups(1);
         cache.setWriteSynchronizationMode(FULL_SYNC);
+        cache.setIndexedTypes(
+            Integer.class, TestObject.class
+        );
 
         cfg.setCacheConfiguration(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
index ae86273..5111efd 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcResultSetSelfTest.java
@@ -17,9 +17,7 @@
 
 package org.apache.ignite.jdbc;
 
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -64,11 +62,14 @@ public class JdbcResultSetSelfTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        CacheConfiguration cache = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cache = defaultCacheConfiguration();
 
         cache.setCacheMode(PARTITIONED);
         cache.setBackups(1);
         cache.setWriteSynchronizationMode(FULL_SYNC);
+        cache.setIndexedTypes(
+            Integer.class, TestObject.class
+        );
 
         cfg.setCacheConfiguration(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
index 9223172..37244a1 100644
--- a/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/jdbc/JdbcStatementSelfTest.java
@@ -17,9 +17,7 @@
 
 package org.apache.ignite.jdbc;
 
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
+import org.apache.ignite.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -57,11 +55,14 @@ public class JdbcStatementSelfTest extends GridCommonAbstractTest {
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
-        CacheConfiguration cache = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cache = defaultCacheConfiguration();
 
         cache.setCacheMode(PARTITIONED);
         cache.setBackups(1);
         cache.setWriteSynchronizationMode(FULL_SYNC);
+        cache.setIndexedTypes(
+            String.class, Person.class
+        );
 
         cfg.setCacheConfiguration(cache);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 05695c4..ce83b38 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -19,8 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.query.*;
-import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.cache.query.annotations.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
@@ -79,12 +77,15 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
 
         cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
 
-        CacheConfiguration cacheCfg = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cacheCfg = defaultCacheConfiguration();
 
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setSwapEnabled(false);
         cacheCfg.setCacheMode(REPLICATED);
         cacheCfg.setOffHeapMaxMemory(1024L * 1024L * 1024L);
+        cacheCfg.setIndexedTypes(
+            Integer.class, CacheValue.class
+        );
 
         cfg.setCacheConfiguration(cacheCfg);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
index 1bdcabd..fa100bc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
@@ -120,7 +120,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest
{
 
         cfg.setSwapSpaceSpi(new FileSwapSpaceSpi());
 
-        CacheConfiguration cacheCfg = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cacheCfg = defaultCacheConfiguration();
 
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cacheCfg.setSwapEnabled(true);
@@ -132,6 +132,9 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest
{
         cacheCfg.setEvictSynchronizedKeyBufferSize(1);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
         cacheCfg.setDistributionMode(NEAR_PARTITIONED);
+        cacheCfg.setIndexedTypes(
+            Long.class, Long.class
+        );
 
         cacheCfg.setEvictionPolicy(null);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/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 3778af3..36d49e7 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
@@ -58,7 +58,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest
{
 
         c.setSwapSpaceSpi(new NoopSwapSpaceSpi());
 
-        CacheConfiguration cc = defaultCacheConfiguration();
+        CacheConfiguration<?,?> cc = defaultCacheConfiguration();
 
         cc.setCacheMode(PARTITIONED);
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
@@ -69,6 +69,9 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest
{
         cc.setEvictionPolicy(new CacheFifoEvictionPolicy(1000));
         cc.setBackups(1);
         cc.setAtomicityMode(TRANSACTIONAL);
+        cc.setIndexedTypes(
+            Integer.class, ObjectValue.class
+        );
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
index f0f073f..4a48804 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java
@@ -75,6 +75,8 @@ public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest
{
 
         IgniteCache<Integer, CacheValue> cache0 = grid(0).jcache(null);
 
+        cache0.loadCache(null);
+
         checkCache(cache0);
         checkQuery(cache0);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
index 472a1c1..0a7a39c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -25,7 +25,6 @@ import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.processors.query.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
 import org.jetbrains.annotations.*;
 
@@ -142,6 +141,14 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest
{
     /** */
     private static final int ENTRY_CNT = 10000;
 
+    /** {@inheritDoc} */
+    @Override protected Class<?>[] indexedTypes() {
+        return new Class<?>[] {
+            Integer.class, TestValue1.class,
+            Integer.class, TestValue2.class
+        };
+    }
+
     /**
      * @throws Exception if failed.
      */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/83108458/modules/scalar/src/test/resources/spring-cache.xml
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/resources/spring-cache.xml b/modules/scalar/src/test/resources/spring-cache.xml
index de870bb..3c7b5b9 100644
--- a/modules/scalar/src/test/resources/spring-cache.xml
+++ b/modules/scalar/src/test/resources/spring-cache.xml
@@ -30,6 +30,12 @@
                 <property name="distributionMode" value="NEAR_PARTITIONED"/>
                 <property name="writeSynchronizationMode" value="FULL_SYNC"/>
                 <property name="queryIndexEnabled" value="true"/>
+                <property name="indexedTypes">
+                    <list>
+                        <value>java.lang.Integer</value>
+                        <value>org.apache.ignite.scalar.tests.ObjectValue</value>
+                    </list>
+                </property>
 
                 <property name="backups" value="1"/>
             </bean>


Mime
View raw message