You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/12/19 12:20:06 UTC
[07/61] [abbrv] ignite git commit: IGNITE-10176 migrate non-core
modules tests from Junit 3 to 4 - Fixes #5659.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java
index 3a90c99..740849f 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlNotNullConstraintTest.java
@@ -58,8 +58,12 @@ import org.apache.ignite.transactions.Transaction;
import org.apache.ignite.transactions.TransactionConcurrency;
import org.apache.ignite.transactions.TransactionIsolation;
import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/** */
+@RunWith(JUnit4.class)
public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -250,6 +254,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testQueryEntityGetSetNotNullFields() throws Exception {
QueryEntity qe = new QueryEntity();
@@ -267,6 +272,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testQueryEntityEquals() throws Exception {
QueryEntity a = new QueryEntity();
@@ -284,6 +290,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxPut() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -301,6 +308,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxPutIfAbsent() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -318,6 +326,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxGetAndPut() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -335,6 +344,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxGetAndPutIfAbsent() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -352,6 +362,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxReplace() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -370,6 +381,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxGetAndReplace() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -388,16 +400,19 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxPutAll() throws Exception {
doAtomicOrImplicitTxPutAll(F.asMap(1, okValue, 5, badValue), 1);
}
/** */
+ @Test
public void testAtomicOrImplicitTxPutAllForSingleValue() throws Exception {
doAtomicOrImplicitTxPutAll(F.asMap(5, badValue), 0);
}
/** */
+ @Test
public void testAtomicOrImplicitTxInvoke() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -413,6 +428,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxInvokeAll() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -434,6 +450,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxPutCreate() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -456,6 +473,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxPutUpdate() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -479,6 +497,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxPutIfAbsent() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -500,6 +519,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxGetAndPut() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -521,6 +541,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxGetAndPutIfAbsent() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -542,6 +563,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxReplace() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -566,6 +588,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxGetAndReplace() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -590,16 +613,19 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxPutAll() throws Exception {
doTxPutAll(F.asMap(1, okValue, 5, badValue));
}
/** */
+ @Test
public void testTxPutAllForSingleValue() throws Exception {
doTxPutAll(F.asMap(5, badValue));
}
/** */
+ @Test
public void testTxInvoke() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -624,6 +650,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxInvokeAll() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -650,6 +677,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxInvokeDelete() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -663,6 +691,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicOrImplicitTxInvokeAllDelete() throws Exception {
executeWithAllCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -679,6 +708,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxInvokeDelete() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -696,6 +726,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTxInvokeAllDelete() throws Exception {
executeWithAllTxCaches(new TestClosure() {
@Override public void run() throws Exception {
@@ -716,6 +747,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testDynamicTableCreateNotNullFieldsAllowed() throws Exception {
executeSql("CREATE TABLE test(id INT PRIMARY KEY, field INT NOT NULL)");
@@ -733,6 +765,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAlterTableAddColumnNotNullFieldAllowed() throws Exception {
executeSql("CREATE TABLE test(id INT PRIMARY KEY, age INT)");
@@ -742,11 +775,13 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicNotNullCheckDmlInsertValues() throws Exception {
checkNotNullCheckDmlInsertValues(CacheAtomicityMode.ATOMIC);
}
/** */
+ @Test
public void testTransactionalNotNullCheckDmlInsertValues() throws Exception {
checkNotNullCheckDmlInsertValues(CacheAtomicityMode.TRANSACTIONAL);
}
@@ -777,11 +812,13 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testAtomicAddColumnNotNullCheckDmlInsertValues() throws Exception {
checkAddColumnNotNullCheckDmlInsertValues(CacheAtomicityMode.ATOMIC);
}
/** */
+ @Test
public void testTransactionalAddColumnNotNullCheckDmlInsertValues() throws Exception {
checkAddColumnNotNullCheckDmlInsertValues(CacheAtomicityMode.TRANSACTIONAL);
}
@@ -814,6 +851,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testNotNullCheckDmlInsertFromSelect() throws Exception {
executeSql("CREATE TABLE test(id INT PRIMARY KEY, name VARCHAR, age INT)");
@@ -839,6 +877,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testNotNullCheckDmlUpdateValues() throws Exception {
executeSql("CREATE TABLE test(id INT PRIMARY KEY, name VARCHAR NOT NULL)");
@@ -865,6 +904,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testNotNullCheckDmlUpdateFromSelect() throws Exception {
executeSql("CREATE TABLE src(id INT PRIMARY KEY, name VARCHAR)");
executeSql("CREATE TABLE dest(id INT PRIMARY KEY, name VARCHAR NOT NULL)");
@@ -912,6 +952,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** Check QueryEntity configuration fails with NOT NULL field and read-through. */
+ @Test
public void testReadThroughRestrictionQueryEntity() throws Exception {
// Node start-up failure (read-through cache store).
GridTestUtils.assertThrowsAnyCause(log, new Callable<Object>() {
@@ -930,6 +971,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** Check QueryEntity configuration fails with NOT NULL field and cache interceptor. */
+ @Test
public void testInterceptorRestrictionQueryEntity() throws Exception {
// Node start-up failure (interceptor).
GridTestUtils.assertThrowsAnyCause(log, new Callable<Object>() {
@@ -948,6 +990,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** Check create table fails with NOT NULL field and read-through. */
+ @Test
public void testReadThroughRestrictionCreateTable() throws Exception {
GridTestUtils.assertThrowsAnyCause(log, new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -958,6 +1001,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** Check create table fails with NOT NULL field and cache interceptor. */
+ @Test
public void testInterceptorRestrictionCreateTable() throws Exception {
GridTestUtils.assertThrowsAnyCause(log, new Callable<Object>() {
@Override public Object call() throws Exception {
@@ -968,6 +1012,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** Check alter table fails with NOT NULL field and read-through. */
+ @Test
public void testReadThroughRestrictionAlterTable() throws Exception {
executeSql("CREATE TABLE test(id INT PRIMARY KEY, age INT) " +
"WITH \"template=" + CACHE_READ_THROUGH + "\"");
@@ -980,6 +1025,7 @@ public class IgniteSqlNotNullConstraintTest extends GridCommonAbstractTest {
}
/** Check alter table fails with NOT NULL field and cache interceptor. */
+ @Test
public void testInterceptorRestrictionAlterTable() throws Exception {
executeSql("CREATE TABLE test(id INT PRIMARY KEY, age INT) " +
"WITH \"template=" + CACHE_INTERCEPTOR + "\"");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java
index b5039cd..c5ffa6a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlParameterizedQueryTest.java
@@ -33,6 +33,9 @@ import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test sql queries with parameters for all types.
@@ -41,6 +44,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
* @author Sergey Chernolyas &sergey_chernolyas@gmail.com&
* @see <a href="https://issues.apache.org/jira/browse/IGNITE-6286">IGNITE-6286</a>
*/
+@RunWith(JUnit4.class)
public class IgniteSqlParameterizedQueryTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -119,6 +123,7 @@ public class IgniteSqlParameterizedQueryTest extends GridCommonAbstractTest {
* testing parametrized query by field with supported type
* @throws Exception if any error occurs
*/
+ @Test
public void testSupportedTypes() throws Exception {
IgniteCache<String, Bookmark> cache = grid(NODE_CLIENT).cache(CACHE_BOOKMARK);
Bookmark bookmark = new Bookmark();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java
index 5e1b8d0..cc86503 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlQueryParallelismTest.java
@@ -32,11 +32,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* A test against setting different values of query parallelism in cache configurations of the same cache.
*/
@SuppressWarnings("unchecked")
+@RunWith(JUnit4.class)
public class IgniteSqlQueryParallelismTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -96,6 +100,7 @@ public class IgniteSqlQueryParallelismTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testIndexSegmentationOnClient() throws Exception {
IgniteCache<Object, Object> c1 = ignite(0).cache("org");
IgniteCache<Object, Object> c2 = ignite(0).cache("pers");
@@ -123,6 +128,7 @@ public class IgniteSqlQueryParallelismTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testIndexSegmentation() throws Exception {
IgniteCache<Object, Object> c1 = ignite(0).cache("org");
IgniteCache<Object, Object> c2 = ignite(0).cache("pers");
@@ -198,4 +204,4 @@ public class IgniteSqlQueryParallelismTest extends GridCommonAbstractTest {
this.name = name;
}
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java
index 4976ee8..283298c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlRoutingTest.java
@@ -48,11 +48,15 @@ import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED;
/** Tests for query partitions derivation. */
+@RunWith(JUnit4.class)
public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -176,6 +180,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQuerySelectAffinityKeyEqualsConstant() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -189,6 +194,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQuerySelectAffinityKeyEqualsParameter() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -203,6 +209,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQuerySelectKeyEqualsParameterReused() throws Exception {
IgniteCache<Integer, Person> cache = grid(NODE_CLIENT).cache(CACHE_PERSON);
@@ -219,6 +226,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQuerySelectKeyEqualsParameter() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -236,6 +244,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** Check group, having, ordering allowed to be unicast requests. */
+ @Test
public void testUnicastQueryGroups() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -257,6 +266,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQuerySelectKeyEqualAndFieldParameter() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -274,6 +284,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQuerySelect2KeyEqualsAndFieldParameter() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -296,6 +307,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQueryKeyTypeConversionParameter() throws Exception {
IgniteCache<Integer, Person> cache = grid(NODE_CLIENT).cache(CACHE_PERSON);
@@ -313,6 +325,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQueryKeyTypeConversionConstant() throws Exception {
IgniteCache<Integer, Person> cache = grid(NODE_CLIENT).cache(CACHE_PERSON);
@@ -329,6 +342,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQueryAffinityKeyTypeConversionParameter() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -344,6 +358,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUnicastQueryAffinityKeyTypeConversionConstant() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -358,6 +373,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBroadcastQuerySelectKeyEqualsOrFieldParameter() throws Exception {
IgniteCache<CallKey, Call> cache = grid(NODE_CLIENT).cache(CACHE_CALL);
@@ -371,6 +387,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUuidKeyAsByteArrayParameter() throws Exception {
String cacheName = "uuidCache";
@@ -411,6 +428,7 @@ public class IgniteSqlRoutingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testDateKeyAsTimestampParameter() throws Exception {
String cacheName = "dateCache";
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
index 73b5ea4..7062258 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSchemaIndexingTest.java
@@ -36,11 +36,15 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests {@link IgniteH2Indexing} support {@link CacheConfiguration#setSqlSchema(String)} configuration.
*/
@SuppressWarnings("unchecked")
+@RunWith(JUnit4.class)
public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -85,6 +89,7 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testCaseSensitive() throws Exception {
//TODO rewrite with dynamic cache creation, and GRID start in #beforeTest - IGNITE-1094 resolved
@@ -112,6 +117,7 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testCustomSchemaMultipleCachesTablesCollision() throws Exception {
//TODO: Rewrite with dynamic cache creation, and GRID start in #beforeTest - IGNITE-1094 resolved
@@ -139,6 +145,7 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testCacheUnregistration() throws Exception {
startGridsMultiThreaded(3, true);
@@ -177,6 +184,7 @@ public class IgniteSqlSchemaIndexingTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSchemaEscapeAll() throws Exception {
startGridsMultiThreaded(3, true);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
index 389a1ab..386a9b4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
@@ -38,10 +38,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for correct distributed queries with index consisted of many segments.
*/
+@RunWith(JUnit4.class)
public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -118,6 +122,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSegmentedIndex() throws Exception {
ignite(0).createCache(cacheConfig(PERSON_CAHE_NAME, true, Integer.class, Person.class));
ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class));
@@ -135,6 +140,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
* Check correct index snapshots with segmented indices.
* @throws Exception If failed.
*/
+ @Test
public void testSegmentedIndexReproducableResults() throws Exception {
ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class));
@@ -160,6 +166,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
* Checks correct <code>select count(*)</code> result with segmented indices.
* @throws Exception If failed.
*/
+ @Test
public void testSegmentedIndexSizeReproducableResults() throws Exception {
ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class));
@@ -186,6 +193,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSegmentedIndexWithEvictionPolicy() throws Exception {
final IgniteCache<Object, Object> cache = ignite(0).createCache(
cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class)
@@ -209,6 +217,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSizeOnSegmentedIndexWithEvictionPolicy() throws Exception {
final IgniteCache<Object, Object> cache = ignite(0).createCache(
cacheConfig(ORG_CACHE_NAME, true, Integer.class, Organization.class)
@@ -232,6 +241,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSegmentedPartitionedWithReplicated() throws Exception {
ignite(0).createCache(cacheConfig(PERSON_CAHE_NAME, true, Integer.class, Person.class));
ignite(0).createCache(cacheConfig(ORG_CACHE_NAME, false, Integer.class, Organization.class));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java
index 6d1b32b..f805266 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest.java
@@ -35,10 +35,14 @@ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for {@link SqlFieldsQueryEx#skipReducerOnUpdate} flag.
*/
+@RunWith(JUnit4.class)
public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -189,6 +193,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testUpdate() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
@@ -201,6 +206,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testUpdateFastKey() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
@@ -214,6 +220,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testUpdateLimit() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
@@ -227,6 +234,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testUpdateWhereSubquery() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, -100);
@@ -245,6 +253,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testUpdateSetSubquery() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
Map<Integer, Trade> trades = getTrades(100, 2);
@@ -262,6 +271,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testUpdateSetTableSubquery() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
Map<Integer, Trade> trades = getTrades(100, 2);
@@ -279,6 +289,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertValues() throws Exception {
String text = "INSERT INTO \"acc\".Account (_key, name, sn, depo)" +
" VALUES (?, ?, ?, ?), (?, ?, ?, ?)";
@@ -291,6 +302,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertFromSelect() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
@@ -307,6 +319,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertFromSelectOrderBy() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
@@ -324,6 +337,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertFromSelectUnion() throws Exception {
Map<Integer, Account> accounts = getAccounts(20, 1, 1000);
@@ -342,6 +356,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertFromSelectGroupBy() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
Map<Integer, Trade> trades = getTrades(100, 2);
@@ -362,6 +377,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertFromSelectDistinct() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 2, 100);
@@ -378,6 +394,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testInsertFromSelectJoin() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
Map<Integer, Stock> stocks = getStocks(5);
@@ -397,6 +414,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testDelete() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
@@ -412,6 +430,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testDeleteTop() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
@@ -427,6 +446,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testDeleteWhereSubquery() throws Exception {
Map<Integer, Account> accounts = getAccounts(20, 1, 100);
Map<Integer, Trade> trades = getTrades(10, 2);
@@ -445,6 +465,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testMergeValues() throws Exception {
Map<Integer, Account> accounts = getAccounts(1, 1, 100);
@@ -459,6 +480,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testMergeFromSelectJoin() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 100);
Map<Integer, Stock> stocks = getStocks(5);
@@ -482,6 +504,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testMergeFromSelectOrderBy() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
@@ -503,6 +526,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlFlagSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testMergeFromSelectGroupBy() throws Exception {
Map<Integer, Account> accounts = getAccounts(100, 1, 1000);
Map<Integer, Trade> trades = getTrades(100, 2);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java
index 0a41d94..ea534cd 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSkipReducerOnUpdateDmlSelfTest.java
@@ -54,6 +54,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED;
@@ -62,6 +65,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_QUERY_EXECUTED;
* Tests for distributed DML.
*/
@SuppressWarnings({"unchecked"})
+@RunWith(JUnit4.class)
public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -201,6 +205,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testSimpleUpdateDistributedReplicated() throws Exception {
fillCaches();
@@ -220,6 +225,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testSimpleUpdateDistributedPartitioned() throws Exception {
fillCaches();
@@ -236,6 +242,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testDistributedUpdateFailedKeys() throws Exception {
// UPDATE can produce failed keys due to concurrent modification
fillCaches();
@@ -254,6 +261,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testDistributedUpdateFail() throws Exception {
fillCaches();
@@ -272,6 +280,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
* @throws Exception if failed.
*/
@SuppressWarnings("ConstantConditions")
+ @Test
public void testQueryParallelism() throws Exception {
String cacheName = CACHE_ORG + "x4";
@@ -294,6 +303,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testEvents() throws Exception {
final CountDownLatch latch = new CountDownLatch(NODE_COUNT);
@@ -332,6 +342,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testSpecificPartitionsUpdate() throws Exception {
fillCaches();
@@ -365,6 +376,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testCancel() throws Exception {
latch = new CountDownLatch(NODE_COUNT + 1);
@@ -407,6 +419,7 @@ public class IgniteSqlSkipReducerOnUpdateDmlSelfTest extends GridCommonAbstractT
*
* @throws Exception if failed.
*/
+ @Test
public void testNodeStopDuringUpdate() throws Exception {
startGrid(NODE_COUNT + 1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/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 1ce2b26..bc3bc19 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
@@ -57,12 +57,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.apache.ignite.testsuites.IgniteIgnore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import org.springframework.util.StringUtils;
/**
* Tests for correct distributed partitioned queries.
*/
@SuppressWarnings("unchecked")
+@RunWith(JUnit4.class)
public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/** */
private static final int CLIENT = 7;
@@ -120,6 +124,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
* Tests offset and limit clauses for query.
* @throws Exception If failed.
*/
+ @Test
public void testOffsetLimit() throws Exception {
IgniteCache<Integer, Integer> c = ignite(0).getOrCreateCache(cacheConfig("ints", true,
Integer.class, Integer.class));
@@ -160,6 +165,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testMergeJoin() {
fail("https://issues.apache.org/jira/browse/IGNITE-10199");
@@ -189,6 +195,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
}
}
+ @Test
public void testPushDownSubquery() {
IgniteCache<Integer, Person> c = ignite(CLIENT).getOrCreateCache(cacheConfig("ps", true,
Integer.class, Person.class));
@@ -234,6 +241,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testPushDown() {
IgniteCache<Integer, Person> c = ignite(CLIENT).getOrCreateCache(cacheConfig("ps", true,
Integer.class, Person.class));
@@ -280,6 +288,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testPushDownLeftJoin() {
IgniteCache<Integer, Person> c = ignite(0).getOrCreateCache(cacheConfig("ps", true,
Integer.class, Person.class));
@@ -330,48 +339,56 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCache() {
doTestReplicatedTablesUsingPartitionedCache(1, false, false);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheSegmented() {
doTestReplicatedTablesUsingPartitionedCache(5, false, false);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheClient() {
doTestReplicatedTablesUsingPartitionedCache(1, true, false);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheSegmentedClient() {
doTestReplicatedTablesUsingPartitionedCache(5, true, false);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheRO() {
doTestReplicatedTablesUsingPartitionedCache(1, false, true);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheSegmentedRO() {
doTestReplicatedTablesUsingPartitionedCache(5, false, true);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheClientRO() {
doTestReplicatedTablesUsingPartitionedCache(1, true, true);
}
/**
*/
+ @Test
public void testReplicatedTablesUsingPartitionedCacheSegmentedClientRO() {
doTestReplicatedTablesUsingPartitionedCache(5, true, true);
}
@@ -415,18 +432,22 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
}
}
+ @Test
public void testPartitionedTablesUsingReplicatedCache() {
doTestPartitionedTablesUsingReplicatedCache(1, false);
}
+ @Test
public void testPartitionedTablesUsingReplicatedCacheSegmented() {
doTestPartitionedTablesUsingReplicatedCache(7, false);
}
+ @Test
public void testPartitionedTablesUsingReplicatedCacheClient() {
doTestPartitionedTablesUsingReplicatedCache(1, true);
}
+ @Test
public void testPartitionedTablesUsingReplicatedCacheSegmentedClient() {
doTestPartitionedTablesUsingReplicatedCache(7, true);
}
@@ -460,6 +481,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testSubQueryWithAggregate() {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
AffinityKey.class, Person2.class);
@@ -490,6 +512,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws InterruptedException If failed.
*/
+ @Test
public void testDistributedJoinFromReplicatedCache() throws InterruptedException {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
Integer.class, Person2.class);
@@ -517,6 +540,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
}
@SuppressWarnings("SuspiciousMethodCalls")
+ @Test
public void testExists() {
IgniteCache<Integer,Person2> x = ignite(0).getOrCreateCache(cacheConfig("x", true,
Integer.class, Person2.class));
@@ -560,6 +584,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSortedMergeIndex() throws Exception {
IgniteCache<Integer,Value> c = ignite(0).getOrCreateCache(cacheConfig("v", true,
Integer.class, Value.class));
@@ -624,6 +649,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testGroupIndexOperations() throws Exception {
IgniteCache<Integer, GroupIndexTestValue> c = ignite(0).getOrCreateCache(cacheConfig("grp", false,
Integer.class, GroupIndexTestValue.class));
@@ -703,6 +729,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testUseIndexHints() {
CacheConfiguration ccfg = cacheConfig("pers", true,
Integer.class, Person2.class);
@@ -736,6 +763,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDistributedJoins() throws Exception {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
Integer.class, Person2.class);
@@ -767,6 +795,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDistributedJoinsUnion() throws Exception {
CacheConfiguration ccfg1 = cacheConfig("pers", true, Integer.class, Person2.class);
CacheConfiguration ccfg2 = cacheConfig("org", true, Integer.class, Organization.class);
@@ -821,6 +850,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDistributedJoinsUnionPartitionedReplicated() throws Exception {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
Integer.class, Person2.class);
@@ -890,6 +920,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDistributedJoinsPlan() throws Exception {
List<IgniteCache<Object, Object>> caches = new ArrayList<>();
@@ -1244,6 +1275,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDistributedJoinsEnforceReplicatedNotLast() throws Exception {
List<IgniteCache<Object, Object>> caches = new ArrayList<>();
@@ -1291,24 +1323,28 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testSchemaQuoted() {
doTestSchemaName("\"ppAf\"");
}
/**
*/
+ @Test
public void testSchemaQuotedUpper() {
doTestSchemaName("\"PPAF\"");
}
/**
*/
+ @Test
public void testSchemaUnquoted() {
doTestSchemaName("ppAf");
}
/**
*/
+ @Test
public void testSchemaUnquotedUpper() {
doTestSchemaName("PPAF");
}
@@ -1341,6 +1377,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testIndexSegmentation() throws Exception {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
Integer.class, Person2.class).setQueryParallelism(4);
@@ -1372,6 +1409,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testReplicationCacheIndexSegmentationFailure() throws Exception {
GridTestUtils.assertThrows(log, new Callable<Void>() {
@Override public Void call() throws Exception {
@@ -1388,6 +1426,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testIndexSegmentationPartitionedReplicated() throws Exception {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
Integer.class, Person2.class).setQueryParallelism(4);
@@ -1454,6 +1493,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testIndexWithDifferentSegmentationLevelsFailure() throws Exception {
CacheConfiguration ccfg1 = cacheConfig("pers", true,
Integer.class, Person2.class).setQueryParallelism(4);
@@ -1630,6 +1670,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* Test HAVING clause.
*/
+ @Test
public void testHaving() {
IgniteCache<Integer, Integer> c = ignite(0).getOrCreateCache(cacheConfig("having", true,
Integer.class, Integer.class));
@@ -1768,6 +1809,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
*
*/
@IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-1886", forceFailure = true)
+ @Test
public void testFunctionNpe() {
IgniteCache<Integer, User> userCache = ignite(0).createCache(
cacheConfig("UserCache", true, Integer.class, User.class));
@@ -1800,6 +1842,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testImplicitJoinConditionGeneration() {
IgniteCache<Integer, Person> p = ignite(0).createCache(cacheConfig("P", true, Integer.class, Person.class));
IgniteCache<Integer, Department> d = ignite(0).createCache(cacheConfig("D", true, Integer.class, Department.class));
@@ -1828,6 +1871,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testJoinWithSubquery() throws Exception {
IgniteCache<Integer, Contract> c1 = ignite(0).createCache(
cacheConfig("Contract", true,
@@ -1857,6 +1901,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception if failed. */
+ @Test
public void testDistributedAggregates() throws Exception {
final String cacheName = "ints";
@@ -1904,6 +1949,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
}
/** @throws Exception if failed. */
+ @Test
public void testCollocatedAggregates() throws Exception {
final String cacheName = "ints";
@@ -1950,6 +1996,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed,
*/
+ @Test
public void testEmptyCacheAggregates() throws Exception {
final String cacheName = "ints";
@@ -1980,6 +2027,7 @@ public class IgniteSqlSplitterSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testAvgVariousDataTypes() throws Exception {
final String cacheName = "avgtypes";
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java
index d6e4a24..49b6d55 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LazyQuerySelfTest.java
@@ -35,10 +35,14 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for lazy query execution.
*/
+@RunWith(JUnit4.class)
public class LazyQuerySelfTest extends GridCommonAbstractTest {
/** Keys ocunt. */
private static final int KEY_CNT = 200;
@@ -62,6 +66,7 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSingleNode() throws Exception {
checkSingleNode(1);
}
@@ -71,6 +76,7 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSingleNodeWithParallelism() throws Exception {
checkSingleNode(4);
}
@@ -80,6 +86,7 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMultipleNodes() throws Exception {
checkMultipleNodes(1);
}
@@ -89,6 +96,7 @@ public class LazyQuerySelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testMultipleNodesWithParallelism() throws Exception {
checkMultipleNodes(4);
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java
index 65b9795..2c07349 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/MultipleStatementsSqlQuerySelfTest.java
@@ -25,10 +25,14 @@ import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for schemas.
*/
+@RunWith(JUnit4.class)
public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest {
/** Node. */
private IgniteEx node;
@@ -48,6 +52,7 @@ public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest {
/**
* Test query without caches.
*/
+ @Test
public void testQuery() {
GridQueryProcessor qryProc = node.context().query();
@@ -91,6 +96,7 @@ public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest {
/**
* Test query without caches.
*/
+ @Test
public void testQueryWithParameters() {
GridQueryProcessor qryProc = node.context().query();
@@ -134,6 +140,7 @@ public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testQueryMultipleStatementsFailed() {
final SqlFieldsQuery qry = new SqlFieldsQuery("select 1; select 1;").setSchema("PUBLIC");
@@ -150,6 +157,7 @@ public class MultipleStatementsSqlQuerySelfTest extends GridCommonAbstractTest {
/**
* Check cached two-steps query.
*/
+ @Test
public void testCachedTwoSteps() {
List<FieldsQueryCursor<List<?>>> curs = sql("SELECT 1; SELECT 2");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java
index ae30552..f0efb63 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/RunningQueriesTest.java
@@ -29,14 +29,19 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for running queries.
*/
+@RunWith(JUnit4.class)
public class RunningQueriesTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testQueriesOriginalText() throws Exception {
IgniteEx ignite = startGrid(0);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java
index a91311a..51dc4dc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlIllegalSchemaSelfTest.java
@@ -30,11 +30,15 @@ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for illegal SQL schemas in node and cache configurations.
*/
@SuppressWarnings({"ThrowableNotThrown", "unchecked"})
+@RunWith(JUnit4.class)
public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void afterTest() throws Exception {
@@ -44,6 +48,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadCacheName() throws Exception {
IgniteConfiguration cfg = getConfiguration();
@@ -63,6 +68,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadCacheNameDynamic() throws Exception {
doubleConsumerAccept(
(node)->{
@@ -90,6 +96,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadSchemaLower() throws Exception {
IgniteConfiguration cfg = getConfiguration();
@@ -109,6 +116,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadSchemaLowerDynamic() throws Exception {
doubleConsumerAccept(
(node) -> {
@@ -136,6 +144,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadSchemaUpper() throws Exception {
IgniteConfiguration cfg = getConfiguration();
@@ -155,6 +164,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadSchemaUpperDynamic() throws Exception {
doubleConsumerAccept(
(node) -> {
@@ -182,6 +192,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadSchemaQuoted() throws Exception {
IgniteConfiguration cfg = getConfiguration();
@@ -201,6 +212,7 @@ public class SqlIllegalSchemaSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBadSchemaQuotedDynamic() throws Exception {
doubleConsumerAccept(
(node) -> {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java
index f3545f2..c21b1dc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlNestedQuerySelfTest.java
@@ -21,10 +21,14 @@ import java.util.List;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for schemas.
*/
+@RunWith(JUnit4.class)
public class SqlNestedQuerySelfTest extends GridCommonAbstractTest {
/** Node. */
private IgniteEx node;
@@ -43,6 +47,7 @@ public class SqlNestedQuerySelfTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testNestingQuery() {
sql("CREATE TABLE txs(txId INTEGER PRIMARY KEY, created INTEGER)");
sql("CREATE TABLE ops(id INTEGER PRIMARY KEY, txId INTEGER, stage VARCHAR, tStamp INTEGER)");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java
index 9e78770..a36b479 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlPushDownFunctionTest.java
@@ -21,10 +21,14 @@ import java.util.List;
import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for schemas.
*/
+@RunWith(JUnit4.class)
public class SqlPushDownFunctionTest extends GridCommonAbstractTest {
/** Node. */
private IgniteEx node;
@@ -43,6 +47,7 @@ public class SqlPushDownFunctionTest extends GridCommonAbstractTest {
/**
*/
+ @Test
public void testPushDownFunction() {
sql("CREATE TABLE Person(id INTEGER PRIMARY KEY, company_id INTEGER)");
sql("CREATE TABLE Company(id INTEGER PRIMARY KEY, name VARCHAR)");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
index dcfffd8..b02ef49 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSchemaSelfTest.java
@@ -34,10 +34,14 @@ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for schemas.
*/
+@RunWith(JUnit4.class)
public class SqlSchemaSelfTest extends GridCommonAbstractTest {
/** Person cache name. */
private static final String CACHE_PERSON = "PersonCache";
@@ -65,6 +69,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testQueryWithoutCacheOnPublicSchema() throws Exception {
GridQueryProcessor qryProc = node.context().query();
@@ -93,6 +98,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testQueryWithoutCacheOnCacheSchema() throws Exception {
node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON)
@@ -125,6 +131,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSchemaChange() throws Exception {
IgniteCache<PersonKey, Person> cache = node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON)
@@ -165,6 +172,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testSchemaChangeOnCacheWithPublicSchema() throws Exception {
IgniteCache<PersonKey, Person> cache = node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON)
@@ -201,6 +209,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testCustomSchemaName() throws Exception {
IgniteCache<Long, Person> cache = registerQueryEntity("Person", CACHE_PERSON);
@@ -212,6 +221,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testCustomSchemaMultipleCaches() throws Exception {
for (int i = 1; i <= 3; i++) {
String tbl = "Person" + i;
@@ -233,6 +243,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testCustomSchemaConcurrentUse() throws Exception {
final AtomicInteger maxIdx = new AtomicInteger();
@@ -296,6 +307,7 @@ public class SqlSchemaSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testTypeConflictInPublicSchema() throws Exception {
node.createCache(new CacheConfiguration<PersonKey, Person>()
.setName(CACHE_PERSON)
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java
index 243dcd1..5be574c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java
@@ -56,10 +56,14 @@ import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.lang.IgniteRunnable;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for ignite SQL system views.
*/
+@RunWith(JUnit4.class)
public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
/** Metrics check attempts. */
private static final int METRICS_CHECK_ATTEMPTS = 10;
@@ -121,10 +125,11 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
assertEquals(IgniteQueryErrorCode.UNSUPPORTED_OPERATION, sqlE.statusCode());
}
-
+
/**
* Test system views modifications.
*/
+ @Test
public void testModifications() throws Exception {
startGrid(getConfiguration());
@@ -152,6 +157,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
/**
* Test different query modes.
*/
+ @Test
public void testQueryModes() throws Exception {
Ignite ignite = startGrid(0);
startGrid(1);
@@ -180,6 +186,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
/**
* Test that we can't use cache tables and system views in the same query.
*/
+ @Test
public void testCacheToViewJoin() throws Exception {
Ignite ignite = startGrid();
@@ -205,6 +212,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testNodesViews() throws Exception {
Ignite igniteSrv = startGrid(getTestIgniteInstanceName(), getConfiguration().setMetricsUpdateFrequency(500L));
@@ -471,6 +479,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
/**
* Test baseline topology system view.
*/
+ @Test
public void testBaselineViews() throws Exception {
cleanPersistenceDir();
@@ -520,6 +529,7 @@ public class SqlSystemViewsSelfTest extends GridCommonAbstractTest {
* Test caches system views.
*/
@SuppressWarnings("ConstantConditions")
+ @Test
public void testCachesViews() throws Exception {
DataStorageConfiguration dsCfg = new DataStorageConfiguration()
.setDefaultDataRegionConfiguration(new DataRegionConfiguration().setName("def").setPersistenceEnabled(true))
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java
index 9afb749..5bbb4e2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildSelfTest.java
@@ -34,10 +34,14 @@ import org.apache.ignite.internal.processors.query.GridQueryProcessor;
import org.apache.ignite.internal.processors.query.schema.SchemaIndexCacheVisitorClosure;
import org.apache.ignite.internal.util.lang.GridCursor;
import org.apache.ignite.internal.util.typedef.internal.U;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Index rebuild after node restart test.
*/
+@RunWith(JUnit4.class)
public class GridIndexRebuildSelfTest extends DynamicIndexAbstractSelfTest {
/** Data size. */
protected static final int AMOUNT = 50;
@@ -111,6 +115,7 @@ public class GridIndexRebuildSelfTest extends DynamicIndexAbstractSelfTest {
* </ul></p>
* @throws Exception if failed.
*/
+ @Test
public void testIndexRebuild() throws Exception {
IgniteEx srv = startServer();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java
index a0d492c..15f8ca8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexRebuildWithMvccEnabledSelfTest.java
@@ -33,10 +33,14 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx
import org.apache.ignite.internal.util.lang.GridCursor;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteBiTuple;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Index rebuild after node restart test.
*/
+@RunWith(JUnit4.class)
public class GridIndexRebuildWithMvccEnabledSelfTest extends GridIndexRebuildSelfTest {
/** {@inheritDoc} */
@Override protected IgniteConfiguration serverConfiguration(int idx, boolean filter) throws Exception {
@@ -45,6 +49,7 @@ public class GridIndexRebuildWithMvccEnabledSelfTest extends GridIndexRebuildSel
}
/** {@inheritDoc} */
+ @Test
public void testIndexRebuild() throws Exception {
IgniteEx srv = startServer();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
index 7e198f8..716cd02 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridIndexingSpiAbstractSelfTest.java
@@ -36,10 +36,14 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Tests for all SQL based indexing SPI implementations.
*/
+@RunWith(JUnit4.class)
public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstractTest {
/** */
private static final LinkedHashMap<String, String> fieldsAA = new LinkedHashMap<>();
@@ -129,6 +133,7 @@ public abstract class GridIndexingSpiAbstractSelfTest extends GridCommonAbstract
* @throws Exception If failed.
*/
@SuppressWarnings({"unchecked", "deprecation"})
+ @Test
public void testLongQueries() throws Exception {
IgniteH2Indexing spi = getIndexing();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java
index 66f9dd2..02c5cba 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2ResultSetIteratorNullifyOnEndSelfTest.java
@@ -29,10 +29,14 @@ import org.apache.ignite.internal.processors.cache.QueryCursorImpl;
import org.apache.ignite.internal.processors.query.GridQueryCacheObjectsIterator;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Test for iterator data link erasure after closing or completing
*/
+@RunWith(JUnit4.class)
public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 2;
@@ -46,6 +50,7 @@ public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractT
/**
* Non local SQL Fields check nullification after close
*/
+ @Test
public void testSqlFieldsQueryClose() {
SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF);
@@ -63,6 +68,7 @@ public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractT
/**
* Non local SQL Fields check nullification after complete
*/
+ @Test
public void testSqlFieldsQueryComplete() {
SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF);
@@ -78,6 +84,7 @@ public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractT
/**
* Local SQL Fields check nullification after close
*/
+ @Test
public void testSqlFieldsQueryLocalClose() {
SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF);
@@ -97,6 +104,7 @@ public class H2ResultSetIteratorNullifyOnEndSelfTest extends GridCommonAbstractT
/**
* Local SQL Fields check nullification after complete
*/
+ @Test
public void testSqlFieldsQueryLocalComplete() {
SqlFieldsQuery qry = new SqlFieldsQuery(SELECT_MAX_SAL_SQLF);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java
index 655d039..f3bd8d7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/H2StatementCacheSelfTest.java
@@ -19,15 +19,20 @@ package org.apache.ignite.internal.processors.query.h2;
import java.sql.PreparedStatement;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*
*/
+@RunWith(JUnit4.class)
public class H2StatementCacheSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testEviction() throws Exception {
H2StatementCache stmtCache = new H2StatementCache(1);
H2CachedStatementKey key1 = new H2CachedStatementKey("", "1");
@@ -44,6 +49,7 @@ public class H2StatementCacheSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLruEvictionInStoreOrder() throws Exception {
H2StatementCache stmtCache = new H2StatementCache(2);
@@ -60,6 +66,7 @@ public class H2StatementCacheSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testLruEvictionInAccessOrder() throws Exception {
H2StatementCache stmtCache = new H2StatementCache(2);
@@ -80,4 +87,4 @@ public class H2StatementCacheSelfTest extends GridCommonAbstractTest {
private static PreparedStatement stmt() {
return new PreparedStatementExImpl(null);
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java
index 366c61a..262beab 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlBigIntegerKeyTest.java
@@ -26,10 +26,14 @@ import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Ensures that BigInteger can be used as key
*/
+@RunWith(JUnit4.class)
public class IgniteSqlBigIntegerKeyTest extends GridCommonAbstractTest {
/** */
private static final String CACHE_NAME = "Mycache";
@@ -65,6 +69,7 @@ public class IgniteSqlBigIntegerKeyTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBigIntegerKeyGet() {
IgniteCache<Object, Object> cache = getCache();
@@ -82,6 +87,7 @@ public class IgniteSqlBigIntegerKeyTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBigIntegerKeyQuery() {
IgniteCache<Object, Object> cache = getCache();
@@ -90,6 +96,7 @@ public class IgniteSqlBigIntegerKeyTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBigIntegerFieldQuery() {
IgniteCache<Object, Object> cache = getCache();