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:05 UTC
[06/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/h2/IgniteSqlQueryMinMaxTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java
index e8403ec..8ac35d8 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/IgniteSqlQueryMinMaxTest.java
@@ -29,8 +29,12 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import java.util.List;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/** Test for SQL min() and max() optimization */
+@RunWith(JUnit4.class)
public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -80,6 +84,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
}
/** Check min() and max() functions in queries */
+ @Test
public void testQueryMinMax() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, ValueObj> cache = client.cache(CACHE_NAME_2);
@@ -118,6 +123,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
}
/** Check min() and max() on empty cache */
+ @Test
public void testQueryMinMaxEmptyCache() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, ValueObj> cache = client.cache(CACHE_NAME_2);
@@ -135,6 +141,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
* Check min() and max() over _key use correct index
* Test uses value object cache
*/
+ @Test
public void testMinMaxQueryPlanOnKey() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, ValueObj> cache = client.cache(CACHE_NAME_2);
@@ -151,6 +158,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
* Check min() and max() over value fields use correct index.
* Test uses value object cache
*/
+ @Test
public void testMinMaxQueryPlanOnFields() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, ValueObj> cache = client.cache(CACHE_NAME_2);
@@ -167,6 +175,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
* Check min() and max() over _key uses correct index
* Test uses primitive cache
*/
+ @Test
public void testSimpleMinMaxQueryPlanOnKey() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, Integer> cache = client.cache(CACHE_NAME);
@@ -183,6 +192,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
* Check min() and max() over _val uses correct index.
* Test uses primitive cache
*/
+ @Test
public void testSimpleMinMaxQueryPlanOnValue() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, Integer> cache = client.cache(CACHE_NAME);
@@ -196,6 +206,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
}
/** Check min() and max() over group */
+ @Test
public void testGroupMinMax() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, ValueObj> cache = client.cache(CACHE_NAME_2);
@@ -225,6 +236,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
}
/** Check min() and max() over group with having clause */
+ @Test
public void testGroupHavingMinMax() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, ValueObj> cache = client.cache(CACHE_NAME_2);
@@ -261,6 +273,7 @@ public class IgniteSqlQueryMinMaxTest extends GridCommonAbstractTest {
}
/** Check min() and max() over group with joins */
+ @Test
public void testJoinGroupMinMax() throws Exception {
try (Ignite client = startGrid("client")) {
IgniteCache<Integer, Integer> cache = client.cache(CACHE_NAME);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java
index 22bff3b..808413b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/PreparedStatementExSelfTest.java
@@ -19,14 +19,19 @@ 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 PreparedStatementExSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testStoringMeta() throws Exception {
PreparedStatement stmt = stmt();
@@ -40,6 +45,7 @@ public class PreparedStatementExSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testStoringMoreMetaKeepsExisting() throws Exception {
PreparedStatement stmt = stmt();
@@ -58,4 +64,4 @@ public class PreparedStatementExSelfTest 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/ThreadLocalObjectPoolSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java
index b7b7a37..7a11261 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/ThreadLocalObjectPoolSelfTest.java
@@ -20,10 +20,14 @@ package org.apache.ignite.internal.processors.query.h2;
import java.util.concurrent.CompletableFuture;
import org.apache.ignite.internal.processors.query.h2.ThreadLocalObjectPool.Reusable;
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 ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest {
/** */
private ThreadLocalObjectPool<Obj> pool = new ThreadLocalObjectPool<>(Obj::new, 1);
@@ -31,6 +35,7 @@ public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testObjectIsReusedAfterRecycling() throws Exception {
Reusable<Obj> o1 = pool.borrow();
o1.recycle();
@@ -43,6 +48,7 @@ public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBorrowedObjectIsNotReturnedTwice() throws Exception {
Reusable<Obj> o1 = pool.borrow();
Reusable<Obj> o2 = pool.borrow();
@@ -53,6 +59,7 @@ public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testObjectShouldBeClosedOnRecycleIfPoolIsFull() throws Exception {
Reusable<Obj> o1 = pool.borrow();
Reusable<Obj> o2 = pool.borrow();
@@ -65,6 +72,7 @@ public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testObjectShouldNotBeReturnedIfPoolIsFull() throws Exception {
Reusable<Obj> o1 = pool.borrow();
Reusable<Obj> o2 = pool.borrow();
@@ -81,6 +89,7 @@ public class ThreadLocalObjectPoolSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testObjectShouldReturnedToRecyclingThreadBag() throws Exception {
Reusable<Obj> o1 = pool.borrow();
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
index 0600137..3604248 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/database/InlineIndexHelperTest.java
@@ -51,6 +51,9 @@ import org.h2.value.ValueString;
import org.h2.value.ValueTime;
import org.h2.value.ValueTimestamp;
import org.h2.value.ValueUuid;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import org.springframework.util.SerializationUtils;
import static org.apache.ignite.internal.processors.query.h2.database.InlineIndexHelper.CANT_BE_COMPARE;
@@ -58,6 +61,7 @@ import static org.apache.ignite.internal.processors.query.h2.database.InlineInde
/**
* Simple tests for {@link InlineIndexHelper}.
*/
+@RunWith(JUnit4.class)
public class InlineIndexHelperTest extends GridCommonAbstractTest {
/** */
private static final int CACHE_ID = 42;
@@ -72,6 +76,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
private static final Comparator ALWAYS_FAILS_COMPARATOR = new AlwaysFailsComparator();
/** Test utf-8 string cutting. */
+ @Test
public void testConvert() {
// 8 bytes total: 1b, 1b, 3b, 3b.
@@ -86,6 +91,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testCompare1bytes() throws Exception {
int maxSize = 3 + 2; // 2 ascii chars + 3 bytes header.
@@ -101,6 +107,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testCompare2bytes() throws Exception {
int maxSize = 3 + 4; // 2 2-bytes chars + 3 bytes header.
@@ -116,6 +123,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testCompare3bytes() throws Exception {
int maxSize = 3 + 6; // 2 3-bytes chars + 3 bytes header.
@@ -131,6 +139,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testCompare4bytes() throws Exception {
int maxSize = 3 + 8; // 2 4-bytes chars + 3 bytes header.
@@ -146,6 +155,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testCompareMixed() throws Exception {
int maxSize = 3 + 8; // 2 up to 4-bytes chars + 3 bytes header.
@@ -156,6 +166,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testCompareMixed2() throws Exception {
int strCnt = 1000;
int symbCnt = 20;
@@ -225,6 +236,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** Limit is too small to cut */
+ @Test
public void testStringCut() {
// 6 bytes total: 3b, 3b.
byte[] bytes = InlineIndexHelper.trimUTF8("\u20ac\u20ac".getBytes(Charsets.UTF_8), 2);
@@ -233,6 +245,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** Test on String values compare */
+ @Test
public void testRelyOnCompare() {
InlineIndexHelper ha = new InlineIndexHelper("", Value.STRING, 0, SortOrder.ASCENDING,
CompareMode.getInstance(null, 0));
@@ -255,6 +268,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** Test on Bytes values compare */
+ @Test
public void testRelyOnCompareBytes() {
InlineIndexHelper ha = new InlineIndexHelper("", Value.BYTES, 0, SortOrder.ASCENDING,
CompareMode.getInstance(null, 0));
@@ -277,6 +291,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** Test on Bytes values compare */
+ @Test
public void testRelyOnCompareJavaObject() {
InlineIndexHelper ha = new InlineIndexHelper("",Value.JAVA_OBJECT, 0, SortOrder.ASCENDING,
CompareMode.getInstance(null, 0));
@@ -301,6 +316,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testStringTruncate() throws Exception {
DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB)
.setMaxSize(1024 * MB);
@@ -352,6 +368,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBytes() throws Exception {
DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB)
.setMaxSize(1024 * MB);
@@ -410,6 +427,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testJavaObject() throws Exception {
DataRegionConfiguration plcCfg = new DataRegionConfiguration().setInitialSize(1024 * MB)
.setMaxSize(1024 * MB);
@@ -468,6 +486,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testNull() throws Exception {
testPutGet(ValueInt.get(-1), ValueNull.INSTANCE, ValueInt.get(3));
testPutGet(ValueInt.get(-1), ValueNull.INSTANCE, ValueInt.get(3));
@@ -477,41 +496,49 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testBoolean() throws Exception {
testPutGet(ValueBoolean.get(true), ValueBoolean.get(false), ValueBoolean.get(true));
}
/** */
+ @Test
public void testByte() throws Exception {
testPutGet(ValueByte.get((byte)-1), ValueByte.get((byte)2), ValueByte.get((byte)3));
}
/** */
+ @Test
public void testShort() throws Exception {
testPutGet(ValueShort.get((short)-32000), ValueShort.get((short)2), ValueShort.get((short)3));
}
/** */
+ @Test
public void testInt() throws Exception {
testPutGet(ValueInt.get(-1), ValueInt.get(2), ValueInt.get(3));
}
/** */
+ @Test
public void testLong() throws Exception {
testPutGet(ValueLong.get(-1), ValueLong.get(2), ValueLong.get(3));
}
/** */
+ @Test
public void testFloat() throws Exception {
testPutGet(ValueFloat.get(1.1f), ValueFloat.get(2.2f), ValueFloat.get(1.1f));
}
/** */
+ @Test
public void testDouble() throws Exception {
testPutGet(ValueDouble.get(1.1f), ValueDouble.get(2.2f), ValueDouble.get(1.1f));
}
/** */
+ @Test
public void testDate() throws Exception {
testPutGet(ValueDate.get(Date.valueOf("2017-02-20")),
ValueDate.get(Date.valueOf("2017-02-21")),
@@ -519,6 +546,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTime() throws Exception {
testPutGet(ValueTime.get(Time.valueOf("10:01:01")),
ValueTime.get(Time.valueOf("11:02:02")),
@@ -526,6 +554,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testTimestamp() throws Exception {
testPutGet(ValueTimestamp.get(Timestamp.valueOf("2017-02-20 10:01:01")),
ValueTimestamp.get(Timestamp.valueOf("2017-02-20 10:01:01")),
@@ -533,6 +562,7 @@ public class InlineIndexHelperTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testUUID() throws Exception {
testPutGet(ValueUuid.get(UUID.randomUUID().toString()),
ValueUuid.get(UUID.randomUUID().toString()),
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
index f9d25d6..157dc3b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/BaseH2CompareQueryTest.java
@@ -39,11 +39,15 @@ import org.apache.ignite.cache.query.annotations.QuerySqlFunction;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.testframework.GridTestUtils;
import org.apache.ignite.testsuites.IgniteIgnore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Base set of queries to compare query results from h2 database instance and mixed ignite caches (replicated and partitioned)
* which have the same data models and data content.
*/
+@RunWith(JUnit4.class)
public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/** Org count. */
public static final int ORG_CNT = 30;
@@ -223,6 +227,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
*
*/
+ @Test
public void testSelectStar() {
assertEquals(1, cachePers.query(new SqlQuery<AffinityKey<?>,Person>(
Person.class, "\t\r\n select \n*\t from Person limit 1")).getAll().size());
@@ -239,6 +244,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testInvalidQuery() throws Exception {
final SqlFieldsQuery sql = new SqlFieldsQuery("SELECT firstName from Person where id <> ? and orgId <> ?");
@@ -255,6 +261,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
* @throws Exception
*/
@IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-705", forceFailure = true)
+ @Test
public void testAllExamples() throws Exception {
// compareQueryRes0("select ? limit ? offset ?");
@@ -424,6 +431,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testParamSubstitution() throws Exception {
compareQueryRes0(cachePers, "select ? from \"pers\".Person", "Some arg");
}
@@ -431,6 +439,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws SQLException If failed.
*/
+ @Test
public void testAggregateOrderBy() throws SQLException {
compareOrderedQueryRes0(cachePers, "select firstName name, count(*) cnt from \"pers\".Person " +
"group by name order by cnt, name desc");
@@ -439,6 +448,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testNullParamSubstitution() throws Exception {
List<List<?>> rs1 = compareQueryRes0(cachePers, "select ? from \"pers\".Person", null);
@@ -449,6 +459,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
*
*/
+ @Test
public void testUnion() throws SQLException {
String base = "select _val v from \"pers\".Person";
@@ -464,6 +475,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testEmptyResult() throws Exception {
compareQueryRes0(cachePers, "select id from \"pers\".Person where 0 = 1");
}
@@ -471,6 +483,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSqlQueryWithAggregation() throws Exception {
compareQueryRes0(cachePers, "select avg(salary) from \"pers\".Person, \"org\".Organization " +
"where Person.orgId = Organization.id and " +
@@ -480,6 +493,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSqlFieldsQuery() throws Exception {
compareQueryRes0(cachePers, "select concat(firstName, ' ', lastName) from \"pers\".Person");
}
@@ -487,6 +501,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSqlFieldsQueryWithJoin() throws Exception {
compareQueryRes0(cachePers, "select concat(firstName, ' ', lastName), "
+ "Organization.name from \"pers\".Person, \"org\".Organization where "
@@ -496,6 +511,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testOrdered() throws Exception {
compareOrderedQueryRes0(cachePers, "select firstName, lastName" +
" from \"pers\".Person" +
@@ -505,6 +521,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSimpleJoin() throws Exception {
// Have expected results.
compareQueryRes0(cachePers, String.format("select id, firstName, lastName" +
@@ -520,6 +537,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testSimpleReplicatedSelect() throws Exception {
compareQueryRes0(cacheProd, "select id, name from \"prod\".Product");
}
@@ -527,6 +545,7 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCrossCache() throws Exception {
compareQueryRes0(cachePers, "select firstName, lastName" +
" from \"pers\".Person, \"purch\".Purchase" +
@@ -962,4 +981,4 @@ public class BaseH2CompareQueryTest extends AbstractH2CompareQueryTest {
return "Address [id=" + id + ", street=" + street + ']';
}
}
-}
\ 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/sql/ExplainSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java
index 1641d41..8e3f881 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/ExplainSelfTest.java
@@ -25,10 +25,14 @@ import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
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;
/**
* Smoke checks for explain operations.
*/
+@RunWith(JUnit4.class)
public class ExplainSelfTest extends GridCommonAbstractTest {
/** Ignite instance. */
private static IgniteEx ignite;
@@ -61,6 +65,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest {
* Complex negative check that verifies EXPLAINs of update operations are not supported and cause correct
* exceptions. Used local and non local queries
*/
+ @Test
public void testComplex() {
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (1, 2);", false);
assertNotSupported("EXPLAIN UPDATE PUBLIC.TEST SET VAL = VAL + 1;", false);
@@ -80,6 +85,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest {
/**
* Check that explain updates are not supported. Perform the same sql query as non-local and then as local query.
*/
+ @Test
public void test2InsertsLocalLast() {
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (1, 2);", false);
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (1, 2);", true);
@@ -88,6 +94,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest {
/**
* Check that explain updates are not supported. Perform the same sql query as local and then as non-local query.
*/
+ @Test
public void test2InsertsLocalFirst() {
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (3, 4);", true);
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (3, 4);", false);
@@ -96,6 +103,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest {
/**
* Check that explain updates are not supported. Perform the same sql query as local 2 times in a row.
*/
+ @Test
public void test2LocalInserts() {
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (5, 6);", true);
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (5, 6);", true);
@@ -104,6 +112,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest {
/**
* Check that explain updates are not supported. Perform the same sql query as non-local 2 times in a row.
*/
+ @Test
public void test2NonLocalInserts() {
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (7, 8);", false);
assertNotSupported("EXPLAIN INSERT INTO PUBLIC.TEST VALUES (7, 8);", false);
@@ -112,6 +121,7 @@ public class ExplainSelfTest extends GridCommonAbstractTest {
/**
* Check that EXPLAIN SELECT queries doesn't cause errors.
*/
+ @Test
public void testExplainSelect() {
execute("EXPLAIN SELECT * FROM PUBLIC.TEST;", false);
execute("EXPLAIN SELECT * FROM PUBLIC.TEST;", true);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 9021a03..6fb90c4 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -60,6 +60,9 @@ import org.h2.message.DbException;
import org.h2.table.Column;
import org.h2.value.Value;
import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -67,6 +70,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridQueryParsingTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
@@ -134,6 +138,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testParseSelectAndUnion() throws Exception {
checkQuery("select 1 from Person p where addrIds in ((1,2,3), (3,4,5))");
checkQuery("select 1 from Person p where addrId in ((1,))");
@@ -327,6 +332,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testUseIndexHints() throws Exception {
checkQuery("select * from Person use index (\"PERSON_NAME_IDX\")");
checkQuery("select * from Person use index (\"PERSON_PARENTNAME_IDX\")");
@@ -344,6 +350,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testParseTableFilter() throws Exception {
Prepared prepared = parse("select Person.old, p1.old, p1.addrId from Person, Person p1 " +
"where exists(select 1 from sch2.Address a where a.id = p1.addrId)");
@@ -387,6 +394,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseMerge() throws Exception {
/* Plain rows w/functions, operators, defaults, and placeholders. */
checkQuery("merge into Person(old, name) values(5, 'John')");
@@ -433,6 +441,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseInsert() throws Exception {
/* Plain rows w/functions, operators, defaults, and placeholders. */
checkQuery("insert into Person(old, name) values(5, 'John')");
@@ -475,6 +484,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseDelete() throws Exception {
checkQuery("delete from Person");
checkQuery("delete from Person p where p.old > ?");
@@ -486,6 +496,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseUpdate() throws Exception {
checkQuery("update Person set name='Peter'");
checkQuery("update Person per set name='Peter', old = 5");
@@ -502,6 +513,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testParseCreateIndex() throws Exception {
assertCreateIndexEquals(
buildCreateIndex(null, "Person", "sch1", false, QueryIndexType.SORTED,
@@ -560,6 +572,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testParseDropIndex() throws Exception {
// Schema that is not set defaults to default schema of connection which is sch1
assertDropIndexEquals(buildDropIndex("idx", "sch1", false), "drop index idx");
@@ -577,6 +590,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
/**
*
*/
+ @Test
public void testParseDropTable() throws Exception {
// Schema that is not set defaults to default schema of connection which is sch1
assertDropTableEquals(buildDropTable("sch1", "tbl", false), "drop table tbl");
@@ -592,6 +606,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseCreateTable() throws Exception {
assertCreateTableEquals(
buildCreateTable("sch1", "Person", "cache", F.asList("id", "city"),
@@ -651,6 +666,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseCreateTableWithDefaults() {
assertParseThrows("create table Person (id int primary key, age int, " +
"ts TIMESTAMP default CURRENT_TIMESTAMP()) WITH \"template=cache\"",
@@ -668,6 +684,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testParseAlterTableAddColumn() throws Exception {
assertAlterTableAddColumnEquals(buildAlterTableAddColumn("SCH2", "Person", false, false,
c("COMPANY", Value.STRING)), "ALTER TABLE SCH2.Person ADD company varchar");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
index 79ef96c..f2ecfa5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/H2CompareBigQueryTest.java
@@ -36,6 +36,9 @@ import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.cache.query.annotations.QuerySqlField;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.internal.util.typedef.X;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* Executes one big query (and subqueries of the big query) to compare query results from h2 database instance and
@@ -72,6 +75,7 @@ import org.apache.ignite.internal.util.typedef.X;
* </pre>
*
*/
+@RunWith(JUnit4.class)
public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
/** Root order count. */
private static final int ROOT_ORDER_CNT = 1000;
@@ -280,6 +284,7 @@ public class H2CompareBigQueryTest extends AbstractH2CompareQueryTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testBigQuery() throws Exception {
X.println();
X.println(bigQry);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java
index 754504e..08e0c79 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CacheQueryMemoryLeakTest.java
@@ -36,8 +36,12 @@ 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;
/** */
+@RunWith(JUnit4.class)
public class CacheQueryMemoryLeakTest extends GridCommonAbstractTest {
/** */
private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -64,6 +68,7 @@ public class CacheQueryMemoryLeakTest extends GridCommonAbstractTest {
*
* @throws Exception If failed.
*/
+ @Test
public void testResultIsMultipleOfPage() throws Exception {
IgniteEx srv = (IgniteEx)startGrid("server");
Ignite client = startGrid("client");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java
index 91d4c0d..be22af5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/CreateTableWithDateKeySelfTest.java
@@ -30,10 +30,14 @@ import org.apache.ignite.cache.query.FieldsQueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
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;
/**
*
*/
+@RunWith(JUnit4.class)
public class CreateTableWithDateKeySelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 1;
@@ -62,6 +66,7 @@ public class CreateTableWithDateKeySelfTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testPassTableWithDateKeyCreation() {
final String creationQry = "CREATE TABLE %s (id DATE primary key, dateField DATE) " +
"WITH \"cache_name=%s, WRAP_VALUE=false\"";
@@ -76,6 +81,7 @@ public class CreateTableWithDateKeySelfTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testPassTableWithTimeKeyCreation() {
final String creationQry = "CREATE TABLE %s (id TIME primary key, dateField TIME) " +
"WITH \"cache_name=%s, WRAP_VALUE=false\"";
@@ -90,6 +96,7 @@ public class CreateTableWithDateKeySelfTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testPassTableWithTimeStampKeyCreation() {
final String creationQry = "CREATE TABLE %s (id TIMESTAMP primary key, dateField TIMESTAMP) " +
"WITH \"cache_name=%s, WRAP_VALUE=false\"";
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java
index 8c4358a..b9c846a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheCauseRetryMessageSelfTest.java
@@ -32,6 +32,9 @@ import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT;
import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.Organization;
@@ -40,6 +43,7 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTest
/**
* Failed to reserve partitions for query (cache is not found on local node) Root cause test
*/
+@RunWith(JUnit4.class)
public class DisappearedCacheCauseRetryMessageSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 2;
@@ -51,6 +55,7 @@ public class DisappearedCacheCauseRetryMessageSelfTest extends GridCommonAbstrac
private IgniteCache<String, JoinSqlTestHelper.Organization> orgCache;
/** */
+ @Test
public void testDisappearedCacheCauseRetryMessage() {
SqlQuery<String, JoinSqlTestHelper.Person> qry = new SqlQuery<String, JoinSqlTestHelper.Person>(JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java
index 40bc5e1..08a7973 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/DisappearedCacheWasNotFoundMessageSelfTest.java
@@ -32,6 +32,9 @@ import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT;
import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.Organization;
@@ -40,6 +43,7 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTest
/**
* Grid cache context is not registered for cache id root cause message test
*/
+@RunWith(JUnit4.class)
public class DisappearedCacheWasNotFoundMessageSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 2;
@@ -51,6 +55,7 @@ public class DisappearedCacheWasNotFoundMessageSelfTest extends GridCommonAbstra
private IgniteCache<String, JoinSqlTestHelper.Organization> orgCache;
/** */
+ @Test
public void testDisappearedCacheWasNotFoundMessage() {
SqlQuery<String, Person> qry = new SqlQuery<String, Person>(Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java
index d27fc52..7978943 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/InOperationExtractPartitionSelfTest.java
@@ -35,11 +35,15 @@ import org.apache.ignite.lang.IgniteInClosure;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.ORG;
import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTestHelper.ORG_COUNT;
/** */
+@RunWith(JUnit4.class)
public class InOperationExtractPartitionSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 8;
@@ -115,6 +119,7 @@ public class InOperationExtractPartitionSelfTest extends GridCommonAbstractTest
}
/** */
+ @Test
public void testAlternativeUsageOfIn(){
try (FieldsQueryCursor<List<?>> cur = orgCache.query(new SqlFieldsQuery(
"SELECT * FROM Organization org WHERE org._KEY IN (SELECT subOrg._KEY FROM Organization subOrg)"))) {
@@ -128,11 +133,13 @@ public class InOperationExtractPartitionSelfTest extends GridCommonAbstractTest
}
/** */
+ @Test
public void testEmptyList() {
testInOperator(Collections.emptyList(), null, 0L, NODES_COUNT - 1);
}
/** */
+ @Test
public void testSingleValueList() {
testInOperator(Collections.singletonList(ORG + 0), null, 1L, 1);
testInOperator(Collections.singletonList(ORG + 1), null, 1L, 1);
@@ -145,6 +152,7 @@ public class InOperationExtractPartitionSelfTest extends GridCommonAbstractTest
}
/** */
+ @Test
public void testMultipleValueList() {
testInOperator(Arrays.asList(ORG + 0, ORG + 3, ORG + String.valueOf(ORG_COUNT - 1)), null, 3, 3);
testInOperator(Arrays.asList("ORG", ORG + 0, ORG + 4, ORG + String.valueOf(ORG_COUNT - 1)), null, 3, 4);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java
index e8f6624..a1abb23 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/NonCollocatedRetryMessageSelfTest.java
@@ -35,12 +35,16 @@ import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.IgniteSpiException;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT;
/**
* Failed to execute non-collocated query root cause message test
*/
+@RunWith(JUnit4.class)
public class NonCollocatedRetryMessageSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 2;
@@ -58,6 +62,7 @@ public class NonCollocatedRetryMessageSelfTest extends GridCommonAbstractTest {
private IgniteCache<String, JoinSqlTestHelper.Person> personCache;
/** */
+ @Test
public void testNonCollocatedRetryMessage() {
SqlQuery<String, JoinSqlTestHelper.Person> qry = new SqlQuery<String, JoinSqlTestHelper.Person>(
JoinSqlTestHelper.Person.class, JoinSqlTestHelper.JOIN_SQL).setArgs("Organization #0");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java
index f748693..b3fb7bc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/RetryCauseMessageSelfTest.java
@@ -43,6 +43,9 @@ import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
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 org.apache.ignite.IgniteSystemProperties.IGNITE_SQL_RETRY_TIMEOUT;
import static org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion.NONE;
@@ -53,6 +56,7 @@ import static org.apache.ignite.internal.processors.query.h2.twostep.JoinSqlTest
/**
* Test for 6 retry cases
*/
+@RunWith(JUnit4.class)
public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 2;
@@ -80,6 +84,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
/**
* Failed to reserve partitions for query (cache is not found on local node)
*/
+ @Test
public void testSynthCacheWasNotFoundMessage() {
GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec");
@@ -121,6 +126,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
/**
* Failed to reserve partitions for query (group reservation failed)
*/
+ @Test
public void testGrpReservationFailureMessage() {
final GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec");
@@ -166,6 +172,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
/**
* Failed to reserve partitions for query (partition of REPLICATED cache is not in OWNING state)
*/
+ @Test
public void testReplicatedCacheReserveFailureMessage() {
fail("https://issues.apache.org/jira/browse/IGNITE-7039");
@@ -191,7 +198,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
aState.getAndSet(stateVal);
}
- else
+ else
startedExecutor.onMessage(nodeId, msg);
}
}.insertRealExecutor(mapQryExec));
@@ -217,6 +224,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
/**
* Failed to reserve partitions for query (partition of PARTITIONED cache cannot be reserved)
*/
+ @Test
public void testPartitionedCacheReserveFailureMessage() {
GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec");
@@ -267,6 +275,7 @@ public class RetryCauseMessageSelfTest extends GridCommonAbstractTest {
/**
* Failed to execute non-collocated query (will retry)
*/
+ @Test
public void testNonCollocatedFailureMessage() {
final GridMapQueryExecutor mapQryExec = GridTestUtils.getFieldValue(h2Idx, IgniteH2Indexing.class, "mapQryExec");
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java
index eaf4243..677344d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/twostep/TableViewSubquerySelfTest.java
@@ -24,10 +24,14 @@ import org.apache.ignite.cache.query.FieldsQueryCursor;
import org.apache.ignite.cache.query.SqlFieldsQuery;
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;
/**
*
*/
+@RunWith(JUnit4.class)
public class TableViewSubquerySelfTest extends GridCommonAbstractTest {
/** */
private static final int NODES_COUNT = 1;
@@ -52,6 +56,7 @@ public class TableViewSubquerySelfTest extends GridCommonAbstractTest {
}
/** */
+ @Test
public void testSubqueryTableView() {
final String cacheName = "a1";
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java
index 71bedaa..2e7effe 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedAtomicColumnConstraintsTest.java
@@ -38,6 +38,9 @@ import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.util.typedef.T2;
import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT;
@@ -48,6 +51,7 @@ import static org.apache.ignite.internal.processors.query.QueryUtils.VAL_FIELD_N
import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause;
/** */
+@RunWith(JUnit4.class)
public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommonAbstractTest {
/** */
private static final long FUT_TIMEOUT = 10_000L;
@@ -213,6 +217,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongStringValueFail() throws Exception {
IgniteCache<String, String> cache = jcache(0, STR_CACHE_NAME);
@@ -228,6 +233,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongStringKeyFail() throws Exception {
IgniteCache<String, String> cache = jcache(0, STR_CACHE_NAME);
@@ -241,6 +247,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongStringValueFieldFail() throws Exception {
IgniteCache<Organization, Address> cache = jcache(0, OBJ_CACHE_NAME);
@@ -256,6 +263,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongStringKeyFieldFail() throws Exception {
IgniteCache<Organization, Address> cache = jcache(0, OBJ_CACHE_NAME);
@@ -269,6 +277,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongStringKeyFail2() throws Exception {
doCheckPutTooLongStringKeyFail2(STR_ORG_CACHE_NAME);
}
@@ -276,6 +285,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongStringKeyFail3() throws Exception {
doCheckPutTooLongStringKeyFail2(STR_ORG_WITH_FIELDS_CACHE_NAME);
}
@@ -296,6 +306,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutLongStringValue() throws Exception {
IgniteCache<String, String> cache = jcache(0, STR_CACHE_NAME);
@@ -311,6 +322,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutLongStringKey() throws Exception {
IgniteCache<String, String> cache = jcache(0, STR_CACHE_NAME);
@@ -324,6 +336,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutLongStringValueField() throws Exception {
IgniteCache<Organization, Address> cache = jcache(0, OBJ_CACHE_NAME);
@@ -339,6 +352,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutLongStringKeyField() throws Exception {
IgniteCache<Organization, Address> cache = jcache(0, OBJ_CACHE_NAME);
@@ -352,6 +366,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutLongStringKey2() throws Exception {
doCheckPutLongStringKey2(STR_ORG_CACHE_NAME);
}
@@ -359,6 +374,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutLongStringKey3() throws Exception {
doCheckPutLongStringKey2(STR_ORG_WITH_FIELDS_CACHE_NAME);
}
@@ -379,6 +395,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalValueFail() throws Exception {
IgniteCache<BigDecimal, BigDecimal> cache = jcache(0, DEC_CACHE_NAME_FOR_PREC);
@@ -394,6 +411,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalKeyFail() throws Exception {
IgniteCache<BigDecimal, BigDecimal> cache = jcache(0, DEC_CACHE_NAME_FOR_PREC);
@@ -407,6 +425,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalKeyFail2() throws Exception {
IgniteCache<BigDecimal, Employee> cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_PREC);
@@ -420,6 +439,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalValueFieldFail() throws Exception {
IgniteCache<DecOrganization, Employee> cache = jcache(0, OBJ_CACHE_NAME_FOR_PREC);
@@ -435,6 +455,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalValueFieldFail2() throws Exception {
IgniteCache<BigDecimal, Employee> cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_PREC);
@@ -450,6 +471,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalKeyFieldFail() throws Exception {
IgniteCache<DecOrganization, Employee> cache = jcache(0, OBJ_CACHE_NAME_FOR_PREC);
@@ -463,6 +485,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalValueScaleFail() throws Exception {
IgniteCache<BigDecimal, BigDecimal> cache = jcache(0, DEC_CACHE_NAME_FOR_SCALE);
@@ -478,6 +501,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalKeyScaleFail() throws Exception {
IgniteCache<BigDecimal, BigDecimal> cache = jcache(0, DEC_CACHE_NAME_FOR_SCALE);
@@ -491,6 +515,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalKeyScaleFail2() throws Exception {
IgniteCache<BigDecimal, Employee> cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_SCALE);
@@ -504,6 +529,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalValueFieldScaleFail() throws Exception {
IgniteCache<DecOrganization, Employee> cache = jcache(0, OBJ_CACHE_NAME_FOR_SCALE);
@@ -519,6 +545,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalValueFieldScaleFail2() throws Exception {
IgniteCache<BigDecimal, Employee> cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_SCALE);
@@ -534,6 +561,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutTooLongDecimalKeyFieldScaleFail() throws Exception {
IgniteCache<DecOrganization, Employee> cache = jcache(0, OBJ_CACHE_NAME_FOR_SCALE);
@@ -547,6 +575,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutValidDecimalKeyAndValue() throws Exception {
IgniteCache<BigDecimal, BigDecimal> cache = jcache(0, DEC_CACHE_NAME_FOR_SCALE);
@@ -562,6 +591,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutValidDecimalKeyAndValueField() throws Exception {
IgniteCache<DecOrganization, Employee> cache = jcache(0, OBJ_CACHE_NAME_FOR_SCALE);
@@ -577,6 +607,7 @@ public class IgniteCachePartitionedAtomicColumnConstraintsTest extends GridCommo
/**
* @throws Exception If failed.
*/
+ @Test
public void testPutValidDecimalKeyAndValueField2() throws Exception {
IgniteCache<BigDecimal, Employee> cache = jcache(0, DEC_EMPL_CACHE_NAME_FOR_SCALE);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java
index cd5c979..c73c04e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalColumnConstraintsTest.java
@@ -21,10 +21,10 @@ import org.apache.ignite.cache.CacheAtomicityMode;
import org.jetbrains.annotations.NotNull;
/** */
-public class IgniteCachePartitionedTransactionalColumnConstraintsTest
+public class IgniteCachePartitionedTransactionalColumnConstraintsTest
extends IgniteCachePartitionedAtomicColumnConstraintsTest {
/** {@inheritDoc} */
- @NotNull protected CacheAtomicityMode atomicityMode() {
+ @Override @NotNull protected CacheAtomicityMode atomicityMode() {
return CacheAtomicityMode.TRANSACTIONAL;
}
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java
index a636a3c..0eceaed 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest.java
@@ -19,8 +19,12 @@ package org.apache.ignite.internal.processors.sql;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/** */
+@RunWith(JUnit4.class)
public class IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest
extends IgniteCachePartitionedAtomicColumnConstraintsTest {
/** {@inheritDoc} */
@@ -29,91 +33,109 @@ public class IgniteCachePartitionedTransactionalSnapshotColumnConstraintTest
}
/** */
+ @Test
@Override public void testPutTooLongStringValueFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringValueFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFail3() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyScaleFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldScaleFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFieldScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java
index 2a7f6b5..6994cfb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest.java
@@ -19,8 +19,12 @@ package org.apache.ignite.internal.processors.sql;
import org.apache.ignite.cache.CacheAtomicityMode;
import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/** */
+@RunWith(JUnit4.class)
public class IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest
extends IgniteCacheReplicatedAtomicColumnConstraintsTest {
/** {@inheritDoc} */
@@ -29,91 +33,109 @@ public class IgniteCacheReplicatedTransactionalSnapshotColumnConstraintTest
}
/** */
+ @Test
@Override public void testPutTooLongStringValueFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringValueFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongStringKeyFail3() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFieldFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyScaleFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalValueFieldScaleFail2() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
/** */
+ @Test
@Override public void testPutTooLongDecimalKeyFieldScaleFail() {
fail("https://issues.apache.org/jira/browse/IGNITE-10066");
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java
index 8e82063..0080bf0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteSQLColumnConstraintsTest.java
@@ -24,12 +24,16 @@ import org.apache.ignite.cache.query.SqlFieldsQuery;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
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 org.apache.ignite.internal.processors.odbc.SqlStateCode.CONSTRAINT_VIOLATION;
import static org.apache.ignite.internal.processors.odbc.SqlStateCode.INTERNAL_ERROR;
/**
*/
+@RunWith(JUnit4.class)
public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/** {@inheritDoc} */
@Override protected void beforeTestsStarted() throws Exception {
@@ -71,6 +75,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCreateTableWithTooLongCharDefault() throws Exception {
checkSQLThrows("CREATE TABLE too_long_default(id INT PRIMARY KEY, str CHAR(5) DEFAULT '123456')",
INTERNAL_ERROR);
@@ -79,11 +84,13 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCreateTableWithTooLongScaleDecimalDefault() throws Exception {
checkSQLThrows("CREATE TABLE too_long_decimal_default_scale(id INT PRIMARY KEY, val DECIMAL(4, 2)" +
" DEFAULT 1.345)", INTERNAL_ERROR);
}
+ @Test
public void testCreateTableWithTooLongDecimalDefault() throws Exception {
checkSQLThrows("CREATE TABLE too_long_decimal_default(id INT PRIMARY KEY, val DECIMAL(4, 2)" +
" DEFAULT 123.45)", INTERNAL_ERROR);
@@ -92,6 +99,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testInsertTooLongDecimal() throws Exception {
checkSQLThrows("INSERT INTO decimal_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 2, 123.45);
@@ -109,6 +117,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testInsertTooLongScaleDecimal() throws Exception {
checkSQLThrows("INSERT INTO decimal_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 3, 1.234);
@@ -126,6 +135,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testInsertTooLongVarchar() throws Exception {
checkSQLThrows("INSERT INTO varchar_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 2, "123456");
@@ -143,6 +153,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testInsertTooLongChar() throws Exception {
checkSQLThrows("INSERT INTO char_table VALUES(?, ?)", CONSTRAINT_VIOLATION, 2, "123456");
@@ -160,9 +171,10 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCharConstraintsAfterAlterTable() throws Exception {
execSQL("ALTER TABLE char_table_2 ADD COLUMN str CHAR(5) NOT NULL");
-
+
execSQL("INSERT INTO char_table_2(id, str) VALUES(?, ?)", 1, "1");
checkSQLResults("SELECT * FROM char_table_2 WHERE id = 1", 1, null, "1");
@@ -183,6 +195,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDecimalConstraintsAfterAlterTable() throws Exception {
execSQL("ALTER TABLE decimal_table_2 ADD COLUMN val DECIMAL(4, 2) NOT NULL");
@@ -218,6 +231,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCharDropColumnWithConstraint() throws Exception {
execSQL("INSERT INTO char_table_3(id, field, field2) VALUES(?, ?, ?)", 1, "12345", 1);
@@ -238,6 +252,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDecimalDropColumnWithConstraint() throws Exception {
execSQL("INSERT INTO decimal_table_3(id, field, field2) VALUES(?, ?, ?)", 1, 12.34, 1);
@@ -258,6 +273,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testCharSqlState() throws Exception {
checkSQLThrows("INSERT INTO char_table_4(id, field) VALUES(?, ?)", CONSTRAINT_VIOLATION, 1, "123456");
@@ -279,6 +295,7 @@ public class IgniteSQLColumnConstraintsTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testDecimalSqlState() throws Exception {
checkSQLThrows("INSERT INTO decimal_table_4 VALUES(?, ?)", CONSTRAINT_VIOLATION,
1, BigDecimal.valueOf(1234.56));
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java
index 5239e1f..1cb4c9d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/IgniteTransactionSQLColumnConstraintTest.java
@@ -20,9 +20,13 @@ package org.apache.ignite.internal.processors.sql;
import java.util.List;
import org.apache.ignite.internal.processors.query.IgniteSQLException;
import org.apache.ignite.testframework.GridTestUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
*/
+@RunWith(JUnit4.class)
public class IgniteTransactionSQLColumnConstraintTest extends IgniteSQLColumnConstraintsTest {
/** {@inheritDoc} */
@Override protected void checkSQLThrows(String sql, String sqlStateCode, Object... args) {
@@ -53,6 +57,7 @@ public class IgniteTransactionSQLColumnConstraintTest extends IgniteSQLColumnCon
/**
* That test is ignored due to drop column(s) operation is unsupported for the MVCC tables.
*/
+ @Test
@Override public void testCharDropColumnWithConstraint() {
// No-op.
}
@@ -60,6 +65,7 @@ public class IgniteTransactionSQLColumnConstraintTest extends IgniteSQLColumnCon
/**
* That test is ignored due to drop column(s) operation is unsupported for the MVCC tables.
*/
+ @Test
@Override public void testDecimalDropColumnWithConstraint() {
// No-op.
}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java
index 7890ab6..cb3307e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/sql/SqlConnectorConfigurationValidationSelfTest.java
@@ -36,11 +36,15 @@ import java.sql.ResultSet;
import java.sql.Statement;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicInteger;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
/**
* SQL connector configuration validation tests.
*/
@SuppressWarnings("deprecation")
+@RunWith(JUnit4.class)
public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstractTest {
/** Node index generator. */
private static final AtomicInteger NODE_IDX_GEN = new AtomicInteger();
@@ -58,6 +62,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testDefault() throws Exception {
check(new SqlConnectorConfiguration(), true);
assertJdbc(null, SqlConnectorConfiguration.DFLT_PORT);
@@ -68,6 +73,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testHost() throws Exception {
check(new SqlConnectorConfiguration().setHost("126.0.0.1"), false);
@@ -84,6 +90,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testPort() throws Exception {
check(new SqlConnectorConfiguration().setPort(-1), false);
check(new SqlConnectorConfiguration().setPort(0), false);
@@ -103,6 +110,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testPortRange() throws Exception {
check(new SqlConnectorConfiguration().setPortRange(-1), false);
@@ -118,6 +126,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testSocketBuffers() throws Exception {
check(new SqlConnectorConfiguration().setSocketSendBufferSize(-4 * 1024), false);
check(new SqlConnectorConfiguration().setSocketReceiveBufferSize(-4 * 1024), false);
@@ -134,6 +143,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testMaxOpenCusrorsPerConnection() throws Exception {
check(new SqlConnectorConfiguration().setMaxOpenCursorsPerConnection(-1), false);
@@ -149,6 +159,7 @@ public class SqlConnectorConfigurationValidationSelfTest extends GridCommonAbstr
*
* @throws Exception If failed.
*/
+ @Test
public void testThreadPoolSize() throws Exception {
check(new SqlConnectorConfiguration().setThreadPoolSize(0), false);
check(new SqlConnectorConfiguration().setThreadPoolSize(-1), false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index cfb56b0..1c9c2b2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@ -46,6 +46,9 @@ 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.jetbrains.annotations.Nullable;
+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.cache.CacheMode.PARTITIONED;
@@ -54,6 +57,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.NONE;
/**
*
*/
+@RunWith(JUnit4.class)
public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
/** IP finder. */
private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
@@ -106,6 +110,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testTask() throws Exception {
Map map = U.field(((IgniteKernal)grid(0)).context().io(), "msgSetMap");
@@ -119,6 +124,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
/**
* @throws Exception If failed.
*/
+ @Test
public void testTaskException() throws Exception {
Map map = U.field(((IgniteKernal)grid(0)).context().io(), "msgSetMap");
@@ -236,4 +242,4 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
return null;
}
}
-}
\ No newline at end of file
+}