http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java index cf098b1..658ba39 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePrimitiveFieldsQuerySelfTest.java @@ -31,10 +31,14 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.LinkedHashMap; import java.util.List; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCachePrimitiveFieldsQuerySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -93,6 +97,7 @@ public class IgniteCachePrimitiveFieldsQuerySelfTest extends GridCommonAbstractT /** * @throws Exception if failed. */ + @Test public void testStaticCache() throws Exception { checkCache(ignite(0).<Integer, IndexedType>cache(CACHE_NAME)); } @@ -112,7 +117,7 @@ public class IgniteCachePrimitiveFieldsQuerySelfTest extends GridCommonAbstractT } /** - * + * */ @SuppressWarnings("unused") private static class IndexedType {
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java index 889d331..935e148 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java @@ -54,6 +54,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.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.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -65,6 +68,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheQueriesLoadTest1 extends GridCommonAbstractTest { /** Operation. */ private static final String OPERATION = "Operation"; @@ -173,6 +177,7 @@ public class IgniteCacheQueriesLoadTest1 extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQueries() throws Exception { runQueries(1, true, 10_000); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java index 9458887..db4c4f4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryH2IndexingLeakTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.internal.util.typedef.CAX; import org.apache.ignite.internal.util.typedef.internal.U; 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_H2_INDEXING_CACHE_CLEANUP_PERIOD; import static org.apache.ignite.IgniteSystemProperties.IGNITE_H2_INDEXING_CACHE_THREAD_USAGE_TIMEOUT; @@ -44,6 +47,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests leaks at the IgniteH2Indexing */ +@RunWith(JUnit4.class) public class IgniteCacheQueryH2IndexingLeakTest extends GridCommonAbstractTest { /** */ private static final long TEST_TIMEOUT = 2 * 60 * 1000; @@ -135,6 +139,7 @@ public class IgniteCacheQueryH2IndexingLeakTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLeaksInIgniteH2IndexingOnTerminatedThread() throws Exception { final IgniteCache<Integer, Integer> c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -187,6 +192,7 @@ public class IgniteCacheQueryH2IndexingLeakTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLeaksInIgniteH2IndexingOnUnusedThread() throws Exception { final IgniteCache<Integer, Integer> c = grid(0).cache(DEFAULT_CACHE_NAME); @@ -220,4 +226,4 @@ public class IgniteCacheQueryH2IndexingLeakTest extends GridCommonAbstractTest { fut.get(); } } -} \ 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/cache/IgniteCacheQueryIndexSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java index f9916ae..73b8eb0 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryIndexSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.internal.util.typedef.internal.S; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CachePeekMode.ALL; @@ -34,6 +37,7 @@ import static org.apache.ignite.cache.CachePeekMode.ALL; /** * Tests for cache query index. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest { /** Grid count. */ private static final int GRID_CNT = 2; @@ -54,6 +58,7 @@ public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testWithoutStoreLoad() throws Exception { IgniteCache<Integer, CacheValue> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -72,6 +77,7 @@ public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testWithStoreLoad() throws Exception { for (int i = 0; i < ENTRY_CNT; i++) storeStgy.putToStore(i, new CacheValue(i)); @@ -133,4 +139,4 @@ public class IgniteCacheQueryIndexSelfTest extends GridCacheAbstractSelfTest { return S.toString(CacheValue.class, this); } } -} \ 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/cache/IgniteCacheQueryLoadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java index 70f350c..7183b51 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryLoadSelfTest.java @@ -41,6 +41,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 org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -48,6 +51,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test that entries are indexed on load/reload methods. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -117,6 +121,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { IgniteCache<Integer, ValueObject> cache = grid().cache(DEFAULT_CACHE_NAME); @@ -135,6 +140,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsync() throws Exception { IgniteCache<Integer, ValueObject> cache = grid().cache(DEFAULT_CACHE_NAME); @@ -153,6 +159,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCacheFiltered() throws Exception { IgniteCache<Integer, ValueObject> cache = grid().cache(DEFAULT_CACHE_NAME); @@ -176,6 +183,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsyncFiltered() throws Exception { IgniteCache<Integer, ValueObject> cache = grid().cache(DEFAULT_CACHE_NAME); @@ -199,6 +207,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReloadAsync() throws Exception { STORE_MAP.put(1, new ValueObject(1)); @@ -219,6 +228,7 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReloadAll() throws Exception { for (int i = 0; i < PUT_CNT; i++) STORE_MAP.put(i, new ValueObject(i)); @@ -328,4 +338,4 @@ public class IgniteCacheQueryLoadSelfTest extends GridCommonAbstractTest { return S.toString(ValueObject.class, this); } } -} \ 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/cache/IgniteCacheQueryMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java index e9ebc18..80e2b57 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java @@ -48,6 +48,9 @@ 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; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -56,6 +59,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Multi-threaded tests for cache queries. */ +@RunWith(JUnit4.class) public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final boolean TEST_INFO = true; @@ -219,6 +223,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapString() throws Exception { int threadCnt = 50; final int keyCnt = 2000; @@ -289,6 +294,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapLong() throws Exception { int threadCnt = 50; final int keyCnt = 2000; @@ -360,6 +366,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapLongString() throws Exception { int threadCnt = 50; final int keyCnt = 2000; @@ -431,6 +438,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSwapUnswapObject() throws Exception { int threadCnt = 50; final int keyCnt = 4000; @@ -503,6 +511,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSameQuery() throws Exception { int threadCnt = 50; final int keyCnt = 10; @@ -566,6 +575,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedNewQueries() throws Exception { int threadCnt = 50; final int keyCnt = 10; @@ -625,6 +635,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedScanQuery() throws Exception { int threadCnt = 50; final int keyCnt = 500; @@ -683,6 +694,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testMultiThreadedSqlFieldsQuery() throws Throwable { int threadCnt = 16; final int keyCnt = 1100; // set resultSet size bigger than page size http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java index 0979085..a89ed29 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryErrorSelfTest.java @@ -21,10 +21,14 @@ import java.util.concurrent.Callable; import javax.cache.CacheException; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Java API query error messages test. */ +@RunWith(JUnit4.class) public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -36,6 +40,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testSelectWrongTable() throws Exception { checkSqlErrorMessage("select from wrong", "Failed to parse query. Table \"WRONG\" not found"); @@ -46,6 +51,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testSelectWrongColumnName() throws Exception { checkSqlErrorMessage("select wrong from test", "Failed to parse query. Column \"WRONG\" not found"); @@ -56,6 +62,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testSelectWrongSyntax() throws Exception { checkSqlErrorMessage("select from test where", "Failed to parse query. Syntax error in SQL statement \"SELECT FROM TEST WHERE[*]"); @@ -66,6 +73,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testDmlWrongTable() throws Exception { checkSqlErrorMessage("insert into wrong (id, val) values (3, 'val3')", "Failed to parse query. Table \"WRONG\" not found"); @@ -85,6 +93,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testDmlWrongColumnName() throws Exception { checkSqlErrorMessage("insert into test (id, wrong) values (3, 'val3')", "Failed to parse query. Column \"WRONG\" not found"); @@ -104,6 +113,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testDmlWrongSyntax() throws Exception { checkSqlErrorMessage("insert test (id, val) values (3, 'val3')", "Failed to parse query. Syntax error in SQL statement \"INSERT TEST[*] (ID, VAL)"); @@ -123,6 +133,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testDdlWrongTable() throws Exception { checkSqlErrorMessage("create table test (id int primary key, val varchar)", "Table already exists: TEST"); @@ -145,6 +156,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testDdlWrongColumnName() throws Exception { checkSqlErrorMessage("create index idx1 on test (wrong)", "Column doesn't exist: WRONG"); @@ -158,6 +170,7 @@ public class IgniteCacheSqlQueryErrorSelfTest extends GridCacheAbstractSelfTest * * @throws Exception If failed. */ + @Test public void testDdlWrongSyntax() throws Exception { checkSqlErrorMessage("create table wrong (id int wrong key, val varchar)", "Failed to parse query. Syntax error in SQL statement \"CREATE TABLE WRONG (ID INT WRONG[*]"); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java index 7241196..e1a1f57 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheSqlQueryMultiThreadedSelfTest.java @@ -38,6 +38,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.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.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testQuery() throws Exception { final IgniteCache<Integer, Person> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -117,6 +122,7 @@ public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstract * Test put and parallel query. * @throws Exception If failed. */ + @Test public void testQueryPut() throws Exception { final IgniteCache<Integer, Person> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -189,4 +195,4 @@ public class IgniteCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstract return age; } } -} \ 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/cache/IgniteCacheStarvationOnRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java index 85d463f..667613b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStarvationOnRebalanceTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.binary.BinaryMarshaller; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; +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.CacheMode.PARTITIONED; @@ -37,6 +40,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Test to reproduce https://issues.apache.org/jira/browse/IGNITE-3073. */ +@RunWith(JUnit4.class) public class IgniteCacheStarvationOnRebalanceTest extends GridCacheAbstractSelfTest { /** Grid count. */ private static final int GRID_CNT = 4; @@ -87,6 +91,7 @@ public class IgniteCacheStarvationOnRebalanceTest extends GridCacheAbstractSelfT /** * @throws Exception If failed. */ + @Test public void testLoadSystemWithPutAndStartRebalancing() throws Exception { final IgniteCache<Integer, CacheValue> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -164,4 +169,4 @@ public class IgniteCacheStarvationOnRebalanceTest extends GridCacheAbstractSelfT return S.toString(CacheValue.class, this); } } -} \ 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/cache/IgniteCacheUpdateSqlQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java index fcc6c1c..d943f9d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheUpdateSqlQuerySelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDmlQuerySelfTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -64,6 +68,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml /** * */ + @Test public void testUpdateSimple() { IgniteCache p = cache(); @@ -94,6 +99,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml /** * */ + @Test public void testUpdateSingle() { IgniteCache p = cache(); @@ -124,6 +130,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml /** * */ + @Test public void testUpdateValueAndFields() { IgniteCache p = cache(); @@ -154,6 +161,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml /** * */ + @Test public void testDefault() { IgniteCache p = cache(); @@ -182,6 +190,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml } /** */ + @Test public void testTypeConversions() throws ParseException { IgniteCache cache = ignite(0).cache("L2AT"); @@ -226,6 +235,7 @@ public class IgniteCacheUpdateSqlQuerySelfTest extends IgniteCacheAbstractSqlDml } /** */ + @Test public void testSingleInnerFieldUpdate() throws ParseException { IgniteCache cache = ignite(0).cache("L2AT"); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java index 7f155ed..79ce60a 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCheckClusterStateBeforeExecuteQueryTest.java @@ -28,12 +28,16 @@ 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; import static org.apache.ignite.testframework.GridTestUtils.assertThrows; /** * */ +@RunWith(JUnit4.class) public class IgniteCheckClusterStateBeforeExecuteQueryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -73,6 +77,7 @@ public class IgniteCheckClusterStateBeforeExecuteQueryTest extends GridCommonAbs /** * @throws Exception On failed. */ + @Test public void testDynamicSchemaChangesPersistence() throws Exception { final IgniteEx ig = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java index cc96c7d..b415d8d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectCacheQueriesFailoverTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteClientReconnectFailoverAbstractTest; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteBiPredicate; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectCacheQueriesFailoverTest extends IgniteClientReconnectFailoverAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -73,6 +77,7 @@ public class IgniteClientReconnectCacheQueriesFailoverTest extends IgniteClientR /** * @throws Exception If failed. */ + @Test public void testReconnectCacheQueries() throws Exception { final Ignite client = grid(serverCount()); @@ -120,6 +125,7 @@ public class IgniteClientReconnectCacheQueriesFailoverTest extends IgniteClientR /** * @throws Exception If failed. */ + @Test public void testReconnectScanQuery() throws Exception { final Ignite client = grid(serverCount()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java index 5f45d80..1f72741 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientReconnectQueriesTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.processors.query.h2.twostep.messages.GridQuery import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstractTest { /** */ public static final String QUERY_CACHE = "query"; @@ -84,6 +88,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr /** * @throws Exception If failed. */ + @Test public void testQueryReconnect() throws Exception { Ignite cln = grid(serverCount()); @@ -128,6 +133,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr /** * @throws Exception If failed. */ + @Test public void testReconnectQueryInProgress() throws Exception { Ignite cln = grid(serverCount()); @@ -187,6 +193,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr /** * @throws Exception If failed. */ + @Test public void testScanQueryReconnect() throws Exception { Ignite cln = grid(serverCount()); @@ -244,6 +251,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr /** * @throws Exception If failed. */ + @Test public void testScanQueryReconnectInProgress1() throws Exception { scanQueryReconnectInProgress(false); } @@ -251,6 +259,7 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr /** * @throws Exception If failed. */ + @Test public void testScanQueryReconnectInProgress2() throws Exception { scanQueryReconnectInProgress(true); } @@ -437,4 +446,4 @@ public class IgniteClientReconnectQueriesTest extends IgniteClientReconnectAbstr return S.toString(Person.class, this); } } -} \ 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/cache/IgniteCrossCachesJoinsQueryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java index 17a8ed3..7c59235 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java @@ -51,6 +51,9 @@ import org.apache.ignite.internal.util.typedef.internal.SB; 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.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -60,6 +63,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; * */ @SuppressWarnings({"unchecked", "PackageVisibleField", "serial"}) +@RunWith(JUnit4.class) public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -317,6 +321,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest /** * @throws Exception If failed. */ + @Test public void testDistributedJoins1() throws Exception { distributedJoins = true; @@ -326,6 +331,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest /** * @throws Exception If failed. */ + @Test public void testDistributedJoins2() throws Exception { distributedJoins = true; @@ -335,6 +341,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest /** * @throws Exception If failed. */ + @Test public void testDistributedJoins3() throws Exception { distributedJoins = true; @@ -344,6 +351,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest /** * @throws Exception If failed. */ + @Test public void testCollocatedJoins1() throws Exception { distributedJoins = false; @@ -353,6 +361,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest /** * @throws Exception If failed. */ + @Test public void testCollocatedJoins2() throws Exception { distributedJoins = false; @@ -362,6 +371,7 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest /** * @throws Exception If failed. */ + @Test public void testCollocatedJoins3() throws Exception { distributedJoins = false; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java index d009f33..1c2aa20 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicSqlRestoreTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.testframework.GridTestUtils; 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.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; @@ -55,6 +58,7 @@ import static org.hamcrest.MatcherAssert.assertThat; * */ @SuppressWarnings("Duplicates") +@RunWith(JUnit4.class) public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implements Serializable { public static final String TEST_CACHE_NAME = "test"; @@ -95,6 +99,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen /** * @throws Exception if failed. */ + @Test public void testMergeChangedConfigOnCoordinator() throws Exception { { //given: two started nodes with test table @@ -167,6 +172,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen * @throws Exception If failed. */ @SuppressWarnings("AssertWithSideEffects") + @Test public void testIndexCreationWhenNodeStopped() throws Exception { // Start topology. startGrid(0); @@ -286,6 +292,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen /** * @throws Exception if failed. */ + @Test public void testTakeConfigFromJoiningNodeOnInactiveGrid() throws Exception { { //given: two started nodes with test table @@ -325,6 +332,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen /** * @throws Exception if failed. */ + @Test public void testResaveConfigAfterMerge() throws Exception { { //given: two started nodes with test table @@ -373,6 +381,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen * @throws Exception if failed. */ @SuppressWarnings("ArraysAsListWithZeroOrOneArgument") + @Test public void testMergeChangedConfigOnInactiveGrid() throws Exception { { //given: two started nodes with test table @@ -460,6 +469,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen /** * @throws Exception if failed. */ + @Test public void testTakeChangedConfigOnActiveGrid() throws Exception { { //given: two started nodes with test table @@ -515,6 +525,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFailJoiningNodeBecauseDifferentSql() throws Exception { { //given: two started nodes with test table @@ -560,6 +571,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFailJoiningNodeBecauseFieldInlineSizeIsDifferent() throws Exception { { //given: two started nodes with test table @@ -601,6 +613,7 @@ public class IgniteDynamicSqlRestoreTest extends GridCommonAbstractTest implemen * @throws Exception if failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFailJoiningNodeBecauseNeedConfigUpdateOnActiveGrid() throws Exception { { startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java index 9b7d206..3887f08 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteErrorOnRebalanceTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.indexing.IndexingQueryFilter; import org.apache.ignite.spi.indexing.IndexingSpi; 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 org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -49,6 +52,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class IgniteErrorOnRebalanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -96,6 +100,7 @@ public class IgniteErrorOnRebalanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testErrorOnRebalance() throws Exception { Ignite srv0 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java index 0dd237d..4cfd05c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IncorrectQueryEntityTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.query.QueryUtils; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * A test for {@link QueryEntity} initialization with incorrect query field name */ +@RunWith(JUnit4.class) public class IncorrectQueryEntityTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { @@ -63,6 +67,7 @@ public class IncorrectQueryEntityTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testIncorrectQueryField() throws Exception { try { startGrid(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java index 93ffa18..25357d5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryEntityCaseMismatchTest.java @@ -32,12 +32,16 @@ import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test reveals issue of null values in SQL query resultset columns that correspond to compound key. * That happens when QueryEntity.keyFields has wrong register compared to QueryEntity.fields. * Issue only manifests for BinaryMarshaller case. Otherwise the keyFields aren't taken into account. */ +@RunWith(JUnit4.class) public class QueryEntityCaseMismatchTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { @@ -94,6 +98,7 @@ public class QueryEntityCaseMismatchTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testCacheInitializationFailure() throws Exception { GridTestUtils.assertThrows(log, new Callable<Void>() { @Override public Void call() throws Exception { http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java index 47666b9..4702995 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/QueryJoinWithDifferentNodeFiltersTest.java @@ -30,10 +30,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; 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 QueryJoinWithDifferentNodeFiltersTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; @@ -89,6 +93,7 @@ public class QueryJoinWithDifferentNodeFiltersTest extends GridCommonAbstractTes /** * @throws Exception if failed. */ + @Test public void testSize() throws Exception { startGrids(NODE_COUNT); @@ -160,4 +165,4 @@ public class QueryJoinWithDifferentNodeFiltersTest extends GridCommonAbstractTes return clusterNode.attribute("DATA") != 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/cache/SqlFieldsQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java index 5cd5998..bf34741 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/SqlFieldsQuerySelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser; 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 SqlFieldsQuerySelfTest extends GridCommonAbstractTest { /** INSERT statement. */ private static final String INSERT = "insert into Person(_key, name) values (5, 'x')"; @@ -44,6 +48,7 @@ public class SqlFieldsQuerySelfTest extends GridCommonAbstractTest { /** * @throws Exception If error. */ + @Test public void testSqlFieldsQuery() throws Exception { startGrids(2); @@ -55,6 +60,7 @@ public class SqlFieldsQuerySelfTest extends GridCommonAbstractTest { /** * @throws Exception If error. */ + @Test public void testSqlFieldsQueryWithTopologyChanges() throws Exception { startGrid(0); @@ -68,6 +74,7 @@ public class SqlFieldsQuerySelfTest extends GridCommonAbstractTest { /** * @throws Exception If error. */ + @Test public void testQueryCaching() throws Exception { startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java index e48c294..30bb018 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/StartCachesInParallelTest.java @@ -25,12 +25,16 @@ import org.apache.ignite.failure.FailureContext; import org.apache.ignite.failure.StopNodeFailureHandler; 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; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ALLOW_START_CACHES_IN_PARALLEL; /** * Tests, that cluster could start and activate with all possible values of IGNITE_ALLOW_START_CACHES_IN_PARALLEL. */ +@RunWith(JUnit4.class) public class StartCachesInParallelTest extends GridCommonAbstractTest { /** IGNITE_ALLOW_START_CACHES_IN_PARALLEL option value before tests. */ private String allowParallel; @@ -93,16 +97,19 @@ public class StartCachesInParallelTest extends GridCommonAbstractTest { } /** */ + @Test public void testWithEnabledOption() throws Exception { doTest("true"); } /** */ + @Test public void testWithDisabledOption() throws Exception { doTest("false"); } /** */ + @Test public void testWithoutOption() throws Exception { doTest(null); } @@ -145,4 +152,4 @@ public class StartCachesInParallelTest extends GridCommonAbstractTest { return super.handle(ignite, failureCtx); } } -} \ 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/cache/authentication/SqlUserCommandSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java index 64819f3..bd7fb7c 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/authentication/SqlUserCommandSelfTest.java @@ -33,10 +33,14 @@ 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; /** * Test for leaks JdbcConnection on SqlFieldsQuery execute. */ +@RunWith(JUnit4.class) public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -101,6 +105,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateUpdateDropUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -128,6 +133,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateWithAlreadyExistUser() throws Exception { AuthorizationContext.context(actxDflt); userSql(0, "CREATE USER test WITH PASSWORD 'test'"); @@ -148,6 +154,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAlterDropNotExistUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -175,6 +182,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNotAuthenticateOperation() throws Exception { for (int i = 0; i < NODES_COUNT; ++i) { final int idx = i; @@ -208,6 +216,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNotAuthorizedOperation() throws Exception { AuthorizationContext.context(actxDflt); @@ -250,6 +259,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDropDefaultUser() throws Exception { AuthorizationContext.context(actxDflt); @@ -269,6 +279,7 @@ public class SqlUserCommandSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQuotedUsername() throws Exception { AuthorizationContext.context(actxDflt); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java index 469ec93..2d1082d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnCreateDestoryIndexTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.internal.util.typedef.T3; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +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; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { /** */ private final List<? extends CacheBlockOnReadAbstractTest> tests = Arrays.asList( @@ -89,6 +93,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedGet() throws Exception { doTestCreateIndex(); } @@ -98,6 +103,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedGet() throws Exception { doTestCreateIndex(); } @@ -107,6 +113,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedGet() throws Exception { doTestCreateIndex(); } @@ -116,6 +123,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedGet() throws Exception { doTestCreateIndex(); } @@ -125,6 +133,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedGetAll() throws Exception { doTestCreateIndex(); } @@ -134,6 +143,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedGetAll() throws Exception { doTestCreateIndex(); } @@ -143,6 +153,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedGetAll() throws Exception { doTestCreateIndex(); } @@ -152,6 +163,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedGetAll() throws Exception { doTestCreateIndex(); } @@ -161,6 +173,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedScan() throws Exception { doTestCreateIndex(); } @@ -170,6 +183,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedScan() throws Exception { doTestCreateIndex(); } @@ -179,6 +193,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedScan() throws Exception { doTestCreateIndex(); } @@ -188,6 +203,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedScan() throws Exception { doTestCreateIndex(); } @@ -197,6 +213,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testCreateIndexAtomicPartitionedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -206,6 +223,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testCreateIndexAtomicReplicatedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -215,6 +233,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testCreateIndexTransactionalPartitionedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -224,6 +243,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testCreateIndexTransactionalReplicatedSqlQuery() throws Exception { doTestCreateIndex(); } @@ -233,6 +253,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedGet() throws Exception { doTestDestroyIndex(); } @@ -242,6 +263,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedGet() throws Exception { doTestDestroyIndex(); } @@ -251,6 +273,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedGet() throws Exception { doTestDestroyIndex(); } @@ -260,6 +283,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(0) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedGet() throws Exception { doTestDestroyIndex(); } @@ -269,6 +293,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedGetAll() throws Exception { doTestDestroyIndex(); } @@ -278,6 +303,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedGetAll() throws Exception { doTestDestroyIndex(); } @@ -287,6 +313,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedGetAll() throws Exception { doTestDestroyIndex(); } @@ -296,6 +323,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(1) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedGetAll() throws Exception { doTestDestroyIndex(); } @@ -305,6 +333,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedScan() throws Exception { doTestDestroyIndex(); } @@ -314,6 +343,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedScan() throws Exception { doTestDestroyIndex(); } @@ -323,6 +353,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedScan() throws Exception { doTestDestroyIndex(); } @@ -332,6 +363,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(2) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedScan() throws Exception { doTestDestroyIndex(); } @@ -341,6 +373,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test public void testDestroyIndexAtomicPartitionedSqlQuery() throws Exception { doTestDestroyIndex(); } @@ -350,6 +383,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = ATOMIC, cacheMode = REPLICATED) + @Test public void testDestroyIndexAtomicReplicatedSqlQuery() throws Exception { doTestDestroyIndex(); } @@ -359,6 +393,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test public void testDestroyIndexTransactionalPartitionedSqlQuery() throws Exception { doTestDestroyIndex(); } @@ -368,6 +403,7 @@ public class CacheBlockOnCreateDestoryIndexTest extends GridCommonAbstractTest { */ @TestIndex(3) @Params(atomicityMode = TRANSACTIONAL, cacheMode = REPLICATED) + @Test public void testDestroyIndexTransactionalReplicatedSqlQuery() throws Exception { doTestDestroyIndex(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java index e9645b2..9f126ef 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheBlockOnSqlQueryTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.cache.query.annotations.QuerySqlField; import org.apache.ignite.configuration.CacheConfiguration; 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; @@ -30,6 +33,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class CacheBlockOnSqlQueryTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @@ -95,60 +99,70 @@ public class CacheBlockOnSqlQueryTest extends CacheBlockOnReadAbstractTest { /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStartServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStartServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStopServerAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStopServerTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStopBaselineAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStopBaselineTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStartClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStartClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = ATOMIC, cacheMode = PARTITIONED) + @Test @Override public void testStopClientAtomicPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } /** {@inheritDoc} */ @Params(baseline = 1, atomicityMode = TRANSACTIONAL, cacheMode = PARTITIONED) + @Test @Override public void testStopClientTransactionalPartitioned() { fail("https://issues.apache.org/jira/browse/IGNITE-9916"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java index 996d6a7..3d3cab1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheClientQueryReplicatedNodeRestartSelfTest.java @@ -48,6 +48,9 @@ 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; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.REPLICATED; @@ -57,6 +60,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test for distributed queries with replicated client cache and node restarts. */ +@RunWith(JUnit4.class) public class IgniteCacheClientQueryReplicatedNodeRestartSelfTest extends GridCommonAbstractTest { /** */ private static final String QRY = "select co.id, count(*) cnt\n" + @@ -208,6 +212,7 @@ public class IgniteCacheClientQueryReplicatedNodeRestartSelfTest extends GridCom /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { int duration = 90 * 1000; int qryThreadNum = 5; @@ -437,4 +442,4 @@ public class IgniteCacheClientQueryReplicatedNodeRestartSelfTest extends GridCom this.companyId = companyId; } } -} \ 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/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java index 0253fe8..af0ddd6 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryConfigurationSelfTest.java @@ -20,12 +20,17 @@ package org.apache.ignite.internal.processors.cache.distributed.near; import java.util.Arrays; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache query configuration. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedPartitionQueryConfigurationSelfTest extends GridCommonAbstractTest { /** Tests partition validation. */ + @Test public void testPartitions() { final SqlFieldsQuery qry = new SqlFieldsQuery("select 1"); @@ -89,4 +94,4 @@ public class IgniteCacheDistributedPartitionQueryConfigurationSelfTest extends G // No-op. } } -} \ 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/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java index 8b85d27..b0a4d67 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.IgniteSystemProperties; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor; import org.apache.ignite.internal.util.typedef.internal.U; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests distributed queries over set of partitions on unstable topology. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest extends IgniteCacheDistributedPartitionQueryAbstractSelfTest { /** {@inheritDoc} */ @@ -51,6 +55,7 @@ public class IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest extends /** * Tests join query within region on unstable topology. */ + @Test public void testJoinQueryUnstableTopology() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); @@ -126,4 +131,4 @@ public class IgniteCacheDistributedPartitionQueryNodeRestartsSelfTest extends restartStats.get(i)); } } -} \ 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/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java index 00c3848..b4e656d 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedPartitionQuerySelfTest.java @@ -24,42 +24,53 @@ import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.affinity.Affinity; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.cache.query.SqlQuery; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests distributed queries over set of partitions on stable topology. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedPartitionQuerySelfTest extends IgniteCacheDistributedPartitionQueryAbstractSelfTest { /** Tests query within region. */ + @Test public void testRegionQuery() { doTestRegionQuery(grid(0)); } /** Tests query within region (client). */ + @Test public void testRegionQueryClient() throws Exception { doTestRegionQuery(grid("client")); } /** Test query within partitions. */ + @Test public void testPartitionsQuery() { doTestPartitionsQuery(grid(0)); } /** Test query within partitions (client). */ + @Test public void testPartitionsQueryClient() throws Exception { doTestPartitionsQuery(grid("client")); } /** Tests join query within region. */ + @Test public void testJoinQuery() { doTestJoinQuery(grid(0)); } /** Tests join query within region. */ + @Test public void testJoinQueryClient() throws Exception { doTestJoinQuery(grid("client")); } /** Tests local query over partitions. */ + @Test public void testLocalQuery() { Affinity<Object> affinity = grid(0).affinity("cl"); @@ -87,4 +98,4 @@ public class IgniteCacheDistributedPartitionQuerySelfTest extends IgniteCacheDis for (List<?> row : rows) assertEquals("Incorrect partition", parts[0], affinity.partition(row.get(0))); } -} \ 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/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java index d5ee0e9..5499fe3 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryCancelSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.internal.util.typedef.G; 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 distributed SQL query cancel related scenarios. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedQueryCancelSelfTest extends GridCommonAbstractTest { /** Grids count. */ private static final int GRIDS_COUNT = 3; @@ -85,6 +89,7 @@ public class IgniteCacheDistributedQueryCancelSelfTest extends GridCommonAbstrac } /** */ + @Test public void testQueryCancelsOnGridShutdown() throws Exception { try (Ignite client = startGrid("client")) { @@ -138,6 +143,7 @@ public class IgniteCacheDistributedQueryCancelSelfTest extends GridCommonAbstrac } /** */ + @Test public void testQueryResponseFailCode() throws Exception { try (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/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java index c0e91f8..3a58346 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; 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 distributed SQL queries cancel by user or timeout. */ +@RunWith(JUnit4.class) public class IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest extends GridCommonAbstractTest { /** Grids count. */ private static final int GRIDS_CNT = 3; @@ -99,76 +103,91 @@ public class IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest extends Gr } /** */ + @Test public void testRemoteQueryExecutionTimeout() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 500, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testRemoteQueryWithMergeTableTimeout() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 500, TimeUnit.MILLISECONDS, true); } /** */ + @Test public void testRemoteQueryExecutionCancel0() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryExecutionCancel1() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryExecutionCancel2() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 1, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryExecutionCancel3() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_1, 3, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel0() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel1() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel2() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 1_500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithMergeTableCancel3() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_2, 3, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel0() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 1, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel1() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 500, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel2() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 1_000, TimeUnit.MILLISECONDS, false); } /** */ + @Test public void testRemoteQueryWithoutMergeTableCancel3() throws Exception { testQueryCancel(CACHE_SIZE, VAL_SIZE, QRY_3, 3, TimeUnit.SECONDS, false); } /** */ + @Test public void testRemoteQueryAlreadyFinishedStop() throws Exception { testQueryCancel(100, VAL_SIZE, QRY_3, 3, TimeUnit.SECONDS, false); }
