http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java index 12209ab..3e849ed 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSelectForUpdateQueryTest.java @@ -18,19 +18,24 @@ package org.apache.ignite.internal.processors.cache.mvcc; import org.apache.ignite.cache.CacheMode; +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 CacheMvccPartitionedSelectForUpdateQueryTest extends CacheMvccSelectForUpdateQueryAbstractTest { /** {@inheritDoc} */ - public CacheMode cacheMode() { + @Override public CacheMode cacheMode() { return PARTITIONED; } /** * */ + @Test public void testSelectForUpdateDistributedSegmented() throws Exception { doTestSelectForUpdateDistributed("PersonSeg", false); } @@ -38,6 +43,7 @@ public class CacheMvccPartitionedSelectForUpdateQueryTest extends CacheMvccSelec /** * */ + @Test public void testSelectForUpdateLocalSegmented() throws Exception { doTestSelectForUpdateLocal("PersonSeg", false); }
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java index eee270c..1f68494 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlCoordinatorFailoverTest.java @@ -18,6 +18,9 @@ package org.apache.ignite.internal.processors.cache.mvcc; import org.apache.ignite.cache.CacheMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SCAN; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -28,6 +31,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * SQL Mvcc coordinator failover test for partitioned caches. */ +@RunWith(JUnit4.class) public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbstractSqlCoordinatorFailoverTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -37,6 +41,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_ClientServer_Backups2_CoordinatorFails() throws Exception { accountsTxReadAll(4, 2, 2, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML, DFLT_TEST_TIME, RestartMode.RESTART_CRD); @@ -45,6 +50,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_Server_Backups1_CoordinatorFails_Persistence() throws Exception { persistence = true; @@ -55,6 +61,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups3_RestartCoordinator_ScanDml() throws Exception { putAllGetAll(RestartMode.RESTART_CRD , 5, 2, 3, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SCAN, DML); @@ -63,6 +70,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_ScanDml_Persistence() throws Exception { persistence = true; @@ -73,6 +81,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups2_RestartCoordinator_SqlDml_Persistence() throws Exception { persistence = true; @@ -83,6 +92,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartCoordinator_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_CRD, 2, 1, 1, 64, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -91,6 +101,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 3, 1, 1, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -99,6 +110,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups2_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 1, 2, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -107,6 +119,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_Server_Backups2_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 0, 2, DFLT_PARTITION_COUNT, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -115,6 +128,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_Server_Backups1_SinglePartition_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 4, 0, 1, 1, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -123,6 +137,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testPutAllGetAll_ClientServer_Backups1_SinglePartition_RestartRandomSrv_SqlDml() throws Exception { putAllGetAll(RestartMode.RESTART_RND_SRV, 3, 1, 1, 1, new InitIndexing(Integer.class, Integer.class), SQL, DML); @@ -131,6 +146,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups2_Sql() throws Exception { updateNObjectsTest(7, 3, 2, 2, DFLT_PARTITION_COUNT, DFLT_TEST_TIME, new InitIndexing(Integer.class, Integer.class), SQL, DML, RestartMode.RESTART_CRD); @@ -139,6 +155,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testUpdate_N_Objects_ClientServer_Backups1_Sql_Persistence() throws Exception { persistence = true; @@ -149,6 +166,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testSqlReadInProgressCoordinatorFails() throws Exception { readInProgressCoordinatorFails(false, false, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -156,6 +174,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testSqlReadInsideTxInProgressCoordinatorFails() throws Exception { readInProgressCoordinatorFails(false, true, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -163,6 +182,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testSqlReadInProgressCoordinatorFails_ReadDelay() throws Exception { readInProgressCoordinatorFails(true, false, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -170,6 +190,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testSqlReadInsideTxInProgressCoordinatorFails_ReadDelay() throws Exception { readInProgressCoordinatorFails(true, true, PESSIMISTIC, REPEATABLE_READ, SQL, DML, new InitIndexing(Integer.class, Integer.class)); } @@ -177,6 +198,7 @@ public class CacheMvccPartitionedSqlCoordinatorFailoverTest extends CacheMvccAbs /** * @throws Exception If failed. */ + @Test public void testReadInProgressCoordinatorFailsSimple_FromServer() throws Exception { readInProgressCoordinatorFailsSimple(false, new InitIndexing(Integer.class, Integer.class), SQL, DML); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java index b987158..86966c1 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccPartitionedSqlTxQueriesWithReducerTest.java @@ -25,20 +25,25 @@ import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.TestRecordingCommunicationSpi; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage; +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.CacheWriteSynchronizationMode.FULL_SYNC; /** */ +@RunWith(JUnit4.class) public class CacheMvccPartitionedSqlTxQueriesWithReducerTest extends CacheMvccSqlTxQueriesWithReducerAbstractTest { /** {@inheritDoc} */ - protected CacheMode cacheMode() { + @Override protected CacheMode cacheMode() { return PARTITIONED; } /** * @throws Exception If failed. */ + @Test public void testQueryUpdateOnUnstableTopologyDoesNotCauseDeadlock() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java index bde2c5d..7dce522 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccReplicatedSqlTxQueriesTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.query.GridQueryProcessor; import org.apache.ignite.transactions.Transaction; +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; @@ -36,9 +39,10 @@ import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class CacheMvccReplicatedSqlTxQueriesTest extends CacheMvccSqlTxQueriesAbstractTest { /** {@inheritDoc} */ - protected CacheMode cacheMode() { + @Override protected CacheMode cacheMode() { return REPLICATED; } @@ -53,6 +57,7 @@ public class CacheMvccReplicatedSqlTxQueriesTest extends CacheMvccSqlTxQueriesAb /** * @throws Exception If failed. */ + @Test public void testReplicatedJoinPartitionedClient() throws Exception { checkReplicatedJoinPartitioned(true); } @@ -60,6 +65,7 @@ public class CacheMvccReplicatedSqlTxQueriesTest extends CacheMvccSqlTxQueriesAb /** * @throws Exception If failed. */ + @Test public void testReplicatedJoinPartitionedServer() throws Exception { checkReplicatedJoinPartitioned(false); } @@ -144,6 +150,7 @@ public class CacheMvccReplicatedSqlTxQueriesTest extends CacheMvccSqlTxQueriesAb * * @throws Exception If failed. */ + @Test public void testReplicatedAndPartitionedUpdateSingleTransaction() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(REPLICATED, FULL_SYNC, 0, DFLT_PARTITION_COUNT) http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java index 0d3ff7e..2bf0cec 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSelectForUpdateQueryAbstractTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +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.internal.processors.cache.index.AbstractSchemaSelfTest.connect; @@ -47,6 +50,7 @@ import static org.apache.ignite.internal.processors.cache.index.AbstractSchemaSe /** * Test for {@code SELECT FOR UPDATE} queries. */ +@RunWith(JUnit4.class) public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvccAbstractTest { /** */ private static final int CACHE_SIZE = 50; @@ -96,6 +100,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * */ + @Test public void testSelectForUpdateDistributed() throws Exception { doTestSelectForUpdateDistributed("Person", false); } @@ -104,6 +109,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateLocal() throws Exception { doTestSelectForUpdateLocal("Person", false); } @@ -111,6 +117,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateOutsideTxDistributed() throws Exception { doTestSelectForUpdateDistributed("Person", true); } @@ -118,6 +125,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateOutsideTxLocal() throws Exception { doTestSelectForUpdateLocal("Person", true); } @@ -193,6 +201,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * */ + @Test public void testSelectForUpdateWithUnion() { assertQueryThrows("select id from person union select 1 for update", "SELECT UNION FOR UPDATE is not supported."); @@ -201,6 +210,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * */ + @Test public void testSelectForUpdateWithJoin() { assertQueryThrows("select p1.id from person p1 join person p2 on p1.id = p2.id for update", "SELECT FOR UPDATE with joins is not supported."); @@ -209,6 +219,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * */ + @Test public void testSelectForUpdateWithLimit() { assertQueryThrows("select id from person limit 0,5 for update", "LIMIT/OFFSET clauses are not supported for SELECT FOR UPDATE."); @@ -217,6 +228,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * */ + @Test public void testSelectForUpdateWithGroupings() { assertQueryThrows("select count(*) from person for update", "SELECT FOR UPDATE with aggregates and/or GROUP BY is not supported."); @@ -228,6 +240,7 @@ public abstract class CacheMvccSelectForUpdateQueryAbstractTest extends CacheMvc /** * @throws Exception If failed. */ + @Test public void testSelectForUpdateAfterAbortedTx() throws Exception { assert disableScheduledVacuum; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java index 36a2322..acb3d34 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSizeTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.query.IgniteQueryErrorCode; import org.apache.ignite.internal.processors.query.IgniteSQLException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CachePeekMode.BACKUP; /** * */ +@RunWith(JUnit4.class) public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -100,6 +104,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testSql() throws Exception { startGridsMultiThreaded(2); @@ -215,6 +220,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testInsertDeleteConcurrent() throws Exception { startGridsMultiThreaded(2); @@ -263,6 +269,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testWriteConflictDoesNotChangeSize() throws Exception { startGridsMultiThreaded(2); @@ -316,6 +323,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testDeleteChangesSizeAfterUnlock() throws Exception { startGridsMultiThreaded(2); @@ -362,6 +370,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testDataStreamerModifiesReplicatedCacheSize() throws Exception { startGridsMultiThreaded(2); @@ -391,6 +400,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testSizeIsConsistentAfterRebalance() throws Exception { IgniteEx ignite = startGrid(0); @@ -415,6 +425,7 @@ public class CacheMvccSizeTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSizeIsConsistentAfterRebalanceDuringInsert() throws Exception { IgniteEx ignite = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java index 7e6c9e8..b10a847 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlConfigurationValidationTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Configuration validation for SQL configured caches. */ +@RunWith(JUnit4.class) public class CacheMvccSqlConfigurationValidationTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -39,6 +43,7 @@ public class CacheMvccSqlConfigurationValidationTest extends CacheMvccAbstractTe /** * @throws Exception If failed. */ + @Test public void testCacheGroupAtomicityModeMismatch1() throws Exception { Ignite node = startGrid(); @@ -62,6 +67,7 @@ public class CacheMvccSqlConfigurationValidationTest extends CacheMvccAbstractTe /** * @throws Exception If failed. */ + @Test public void testCacheGroupAtomicityModeMismatch2() throws Exception { Ignite node = startGrid(); @@ -84,6 +90,7 @@ public class CacheMvccSqlConfigurationValidationTest extends CacheMvccAbstractTe /** * @throws Exception If failed. */ + @Test public void testTxDifferentMvccSettingsTransactional() throws Exception { ccfg = defaultCacheConfiguration().setSqlSchema("PUBLIC"); Ignite node = startGrid(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java index bdd9a76..5cc6efe 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlLockTimeoutTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.configuration.TransactionConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.transactions.Transaction; +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; @@ -41,6 +44,7 @@ import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; /** */ +@RunWith(JUnit4.class) public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** */ private static final int TIMEOUT_MILLIS = 200; @@ -61,6 +65,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsForPartitionedCache() throws Exception { checkLockTimeouts(partitionedCacheConfig()); } @@ -68,6 +73,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsForReplicatedCache() throws Exception { checkLockTimeouts(replicatedCacheConfig()); } @@ -75,6 +81,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsAfterDefaultTxTimeoutForPartitionedCache() throws Exception { checkLockTimeoutsAfterDefaultTxTimeout(partitionedCacheConfig()); } @@ -82,6 +89,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testLockTimeoutsAfterDefaultTxTimeoutForReplicatedCache() throws Exception { checkLockTimeoutsAfterDefaultTxTimeout(replicatedCacheConfig()); } @@ -89,6 +97,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testConcurrentForPartitionedCache() throws Exception { checkTimeoutsConcurrent(partitionedCacheConfig()); } @@ -96,6 +105,7 @@ public class CacheMvccSqlLockTimeoutTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testConcurrentForReplicatedCache() throws Exception { checkTimeoutsConcurrent(replicatedCacheConfig()); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java index 313b58f..5d81753 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlQueriesAbstractTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -57,10 +60,12 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA * TODO IGNITE-6739: dynamic index create. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, PUT); @@ -69,6 +74,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_WithRemoves_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, PUT); @@ -77,6 +83,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, PUT); @@ -85,6 +92,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_SingleNode_Persistence() throws Exception { persistence = true; @@ -94,6 +102,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSumSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL_SUM, PUT); @@ -102,6 +111,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_WithRemoves_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, PUT); @@ -110,6 +120,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_WithRemoves_SingleNode_Persistence() throws Exception { persistence = true; @@ -119,6 +130,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testAccountsTxSql_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, PUT); @@ -127,6 +139,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testUpdateSingleValue_SingleNode() throws Exception { updateSingleValue(true, false); } @@ -134,6 +147,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testUpdateSingleValue_LocalQuery_SingleNode() throws Exception { updateSingleValue(true, true); } @@ -141,6 +155,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testUpdateSingleValue_ClientServer() throws Exception { updateSingleValue(false, false); } @@ -355,6 +370,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_SingleNode() throws Exception { joinTransactional(true, false); } @@ -362,6 +378,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_ClientServer() throws Exception { joinTransactional(false, false); } @@ -369,6 +386,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_DistributedJoins_ClientServer() throws Exception { joinTransactional(false, true); } @@ -524,6 +542,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testJoinTransactional_DistributedJoins_ClientServer2() throws Exception { final int KEYS = 100; @@ -632,6 +651,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testDistributedJoinSimple() throws Exception { startGridsMultiThreaded(4); @@ -693,6 +713,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testCacheRecreate() throws Exception { cacheRecreate(new InitIndexing(Integer.class, MvccTestAccount.class)); } @@ -700,6 +721,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testCacheRecreateChangeIndexedType() throws Exception { Ignite srv0 = startGrid(0); @@ -775,6 +797,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testChangeValueType1() throws Exception { Ignite srv0 = startGrid(0); @@ -802,6 +825,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testChangeValueType2() throws Exception { Ignite srv0 = startGrid(0); @@ -833,6 +857,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testCountTransactional_SingleNode() throws Exception { countTransactional(true); } @@ -840,6 +865,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testCountTransactional_ClientServer() throws Exception { countTransactional(false); } @@ -979,6 +1005,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testMaxMinTransactional_SingleNode() throws Exception { maxMinTransactional(true); } @@ -986,6 +1013,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testMaxMinTransactional_ClientServer() throws Exception { maxMinTransactional(false); } @@ -1140,6 +1168,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testSqlQueriesWithMvcc() throws Exception { Ignite srv0 = startGrid(0); @@ -1243,6 +1272,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testSqlSimple() throws Exception { startGrid(0); @@ -1310,6 +1340,7 @@ public abstract class CacheMvccSqlQueriesAbstractTest extends CacheMvccAbstractT /** * @throws Exception If failed. */ + @Test public void testSqlSimplePutRemoveRandom() 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/mvcc/CacheMvccSqlTxQueriesAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java index 2b6d8bf..1dd7fd5 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesAbstractTest.java @@ -62,6 +62,9 @@ import org.apache.ignite.internal.util.typedef.internal.S; import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -75,10 +78,12 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Tests for transactional SQL. */ +@RunWith(JUnit4.class) public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -87,6 +92,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_SingleNode_SinglePartition() throws Exception { accountsTxReadAll(1, 0, 0, 1, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -95,6 +101,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -103,6 +110,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_SingleNode_Persistence() throws Exception { persistence = true; @@ -112,6 +120,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL_SUM, DML); @@ -120,6 +129,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_WithRemoves_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL_SUM, DML); @@ -128,6 +138,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_WithRemoves__ClientServer_Backups0() throws Exception { accountsTxReadAll(4, 2, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL_SUM, DML); @@ -136,6 +147,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSumSql_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL_SUM, DML); @@ -144,6 +156,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_SingleNode() throws Exception { accountsTxReadAll(1, 0, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -152,6 +165,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_SingleNode_Persistence() throws Exception { persistence = true; @@ -161,6 +175,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups0() throws Exception { accountsTxReadAll(4, 2, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -169,6 +184,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups0() throws Exception { accountsTxReadAll(4, 2, 0, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -177,6 +193,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups0_Persistence() throws Exception { persistence = true; @@ -186,6 +203,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups1() throws Exception { accountsTxReadAll(3, 0, 1, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -194,6 +212,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups1() throws Exception { accountsTxReadAll(4, 2, 1, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -202,6 +221,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups1_Persistence() throws Exception { persistence = true; @@ -211,6 +231,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), false, SQL, DML); @@ -219,6 +240,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_WithRemoves_ClientServer_Backups2() throws Exception { accountsTxReadAll(4, 2, 2, 64, new InitIndexing(Integer.class, MvccTestAccount.class), true, SQL, DML); @@ -227,6 +249,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testAccountsTxDmlSql_ClientServer_Backups2_Persistence() throws Exception { persistence = true; @@ -236,6 +259,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testParsingErrorHasNoSideEffect() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 0, 4) .setIndexedTypes(Integer.class, Integer.class); @@ -283,6 +307,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -328,6 +353,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertStaticCacheImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -358,6 +384,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryDeleteStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -404,6 +431,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryFastDeleteStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -449,6 +477,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryFastUpdateStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -494,6 +523,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryFastDeleteObjectStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -538,6 +568,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryFastUpdateObjectStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -582,6 +613,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryDeleteStaticCacheImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -618,6 +650,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryUpdateStaticCache() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -659,6 +692,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryUpdateStaticCacheImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -695,6 +729,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryDeadlockWithTxTimeout() throws Exception { checkQueryDeadlock(TimeoutMode.TX); } @@ -702,6 +737,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryDeadlockWithStmtTimeout() throws Exception { checkQueryDeadlock(TimeoutMode.STMT); } @@ -785,6 +821,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryDeadlockImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 0, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -853,6 +890,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertClient() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -902,6 +940,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertClientImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -936,6 +975,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertSubquery() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -979,6 +1019,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertSubqueryImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -1017,6 +1058,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryUpdateSubquery() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -1060,6 +1102,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryUpdateSubqueryImplicit() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class, Integer.class, MvccTestSqlIndexValue.class); @@ -1098,6 +1141,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertMultithread() throws Exception { final int THREAD_CNT = 8; final int BATCH_SIZE = 1000; @@ -1165,6 +1209,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertUpdateMultithread() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9470"); @@ -1274,6 +1319,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertVersionConflict() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1339,6 +1385,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testInsertAndFastDeleteWithoutVersionConflict() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1369,6 +1416,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testInsertAndFastUpdateWithoutVersionConflict() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1399,6 +1447,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testInsertFastUpdateConcurrent() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1430,6 +1479,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertRollback() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1470,6 +1520,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertUpdateSameKeys() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1511,6 +1562,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryInsertUpdateSameKeysInSameOperation() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1543,6 +1595,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testQueryPendingUpdates() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1611,6 +1664,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testSelectProducesTransaction() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -1645,6 +1699,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testRepeatableRead() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, MvccTestSqlIndexValue.class); @@ -1696,6 +1751,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testFastInsertUpdateConcurrent() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1720,6 +1776,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testIterator() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -1790,6 +1847,7 @@ public abstract class CacheMvccSqlTxQueriesAbstractTest extends CacheMvccAbstrac /** * @throws Exception If failed. */ + @Test public void testHints() throws Exception { persistence = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java index 7826e5f..e6b0fd7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlTxQueriesWithReducerAbstractTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.testframework.GridTestUtils.assertThrowsWithCause; @@ -49,6 +52,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Tests for transactional SQL. */ +@RunWith(JUnit4.class) public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends CacheMvccAbstractTest { /** */ private static final int TIMEOUT = 3000; @@ -64,6 +68,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsert() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -117,6 +122,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsertDuplicateKey() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -165,6 +171,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerMerge() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -217,6 +224,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerMultiBatchPerNodeServer() throws Exception { checkMultiBatchPerNode(false); } @@ -224,6 +232,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerMultiBatchPerNodeClient() throws Exception { checkMultiBatchPerNode(true); } @@ -292,6 +301,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerDelete() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) @@ -343,6 +353,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerUpdate() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) @@ -395,6 +406,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerImplicitTxInsert() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -444,6 +456,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerRollbackInsert() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -506,6 +519,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerDeadlockInsertWithTxTimeout() throws Exception { checkQueryReducerDeadlockInsert(TimeoutMode.TX); } @@ -513,6 +527,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerDeadlockInsertWithStmtTimeout() throws Exception { checkQueryReducerDeadlockInsert(TimeoutMode.STMT); } @@ -612,6 +627,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsertVersionConflict() throws Exception { ccfgs = new CacheConfiguration[] { cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) @@ -686,6 +702,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerInsertValues() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -723,6 +740,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerMergeValues() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); @@ -763,6 +781,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerFastUpdate() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -804,6 +823,7 @@ public abstract class CacheMvccSqlTxQueriesWithReducerAbstractTest extends Cache /** * @throws Exception If failed. */ + @Test public void testQueryReducerFastDelete() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, CacheMvccSqlTxQueriesAbstractTest.MvccTestSqlIndexValue.class); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java index 943f5a4..3b5f8e4 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccSqlUpdateCountersTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.internal.util.lang.GridInClosure3; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -46,6 +49,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA * Test for MVCC caches update counters behaviour. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -55,6 +59,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersInsertSimple() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -93,6 +98,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersDoubleUpdate() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -139,6 +145,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersRollback() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, DFLT_PARTITION_COUNT) .setIndexedTypes(Integer.class, Integer.class); @@ -185,6 +192,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeleteOwnKey() throws Exception { ccfg = cacheConfiguration(cacheMode(), FULL_SYNC, 2, 1) .setCacheMode(CacheMode.REPLICATED) @@ -320,6 +328,7 @@ public class CacheMvccSqlUpdateCountersTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateCountersMultithreaded() throws Exception { final int writers = 4; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java index b07a187..e0415b8 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccStreamingInsertTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.IgniteJdbcDriver; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.configuration.CacheConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.Arrays.asList; /** * */ +@RunWith(JUnit4.class) public class CacheMvccStreamingInsertTest extends CacheMvccAbstractTest { /** */ private IgniteCache<Object, Object> sqlNexus; @@ -68,6 +72,7 @@ public class CacheMvccStreamingInsertTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStreamingInsertWithoutOverwrite() throws Exception { conn.createStatement().execute("SET STREAMING 1 BATCH_SIZE 2 ALLOW_OVERWRITE 0 " + " PER_NODE_BUFFER_SIZE 1000 FLUSH_FREQUENCY 100"); @@ -93,6 +98,7 @@ public class CacheMvccStreamingInsertTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateWithOverwrite() throws Exception { conn.createStatement().execute("SET STREAMING 1 BATCH_SIZE 2 ALLOW_OVERWRITE 1 " + " PER_NODE_BUFFER_SIZE 1000 FLUSH_FREQUENCY 100"); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java index a329609..6df2143 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxNodeMappingTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx import org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -48,6 +51,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Test checks that transactions started on nodes collect all nodes participating in distributed transaction. */ +@RunWith(JUnit4.class) public class CacheMvccTxNodeMappingTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -57,6 +61,7 @@ public class CacheMvccTxNodeMappingTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testAllTxNodesAreTrackedCli() throws Exception { checkAllTxNodesAreTracked(false); } @@ -64,6 +69,7 @@ public class CacheMvccTxNodeMappingTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testAllTxNodesAreTrackedSrv() throws Exception { checkAllTxNodesAreTracked(true); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java index 01f50cc..61f6395 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTxRecoveryTest.java @@ -54,6 +54,9 @@ import org.apache.ignite.lang.IgniteBiPredicate; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -69,6 +72,7 @@ import static org.apache.ignite.transactions.TransactionState.PREPARING; import static org.apache.ignite.transactions.TransactionState.ROLLED_BACK; /** */ +@RunWith(JUnit4.class) public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** */ public enum TxEndResult { @@ -99,6 +103,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitNearFailure1() throws Exception { checkRecoveryNearFailure(COMMIT, CLIENT); } @@ -106,6 +111,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitNearFailure2() throws Exception { checkRecoveryNearFailure(COMMIT, SERVER); } @@ -113,6 +119,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackNearFailure1() throws Exception { checkRecoveryNearFailure(ROLLBAK, CLIENT); } @@ -120,6 +127,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackNearFailure2() throws Exception { checkRecoveryNearFailure(ROLLBAK, SERVER); } @@ -127,6 +135,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitPrimaryFailure1() throws Exception { checkRecoveryPrimaryFailure(COMMIT, false); } @@ -134,6 +143,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackPrimaryFailure1() throws Exception { checkRecoveryPrimaryFailure(ROLLBAK, false); } @@ -141,6 +151,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommitPrimaryFailure2() throws Exception { checkRecoveryPrimaryFailure(COMMIT, true); } @@ -148,6 +159,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryRollbackPrimaryFailure2() throws Exception { checkRecoveryPrimaryFailure(ROLLBAK, true); } @@ -344,6 +356,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testRecoveryCommit() throws Exception { startGridsMultiThreaded(2); @@ -387,6 +400,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testCountersNeighborcastServerFailed() throws Exception { int srvCnt = 4; @@ -493,6 +507,7 @@ public class CacheMvccTxRecoveryTest extends CacheMvccAbstractTest { /** * @throws Exception if failed. */ + @Test public void testUpdateCountersGapIsClosed() throws Exception { int srvCnt = 3; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java index fef8487..0f4b918 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadBulkOpsTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET; @@ -55,6 +58,7 @@ import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstract /** * Test basic mvcc bulk cache operations. */ +@RunWith(JUnit4.class) public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -102,6 +106,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationGetPut() throws Exception { checkOperations(GET, GET, PUT, true); checkOperations(GET, GET, PUT, false); @@ -110,6 +115,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationInvoke() throws Exception { checkOperations(GET, GET, WriteMode.INVOKE, true); checkOperations(GET, GET, WriteMode.INVOKE, false); @@ -118,6 +124,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationSqlPut() throws Exception { checkOperations(SQL, SQL, PUT, true); checkOperations(SQL, SQL, PUT, false); @@ -126,6 +133,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationSqlInvoke() throws Exception { checkOperations(SQL, SQL, WriteMode.INVOKE, true); checkOperations(SQL, SQL, WriteMode.INVOKE, false); @@ -134,6 +142,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationSqlDml() throws Exception { checkOperations(SQL, SQL, DML, true); checkOperations(SQL, SQL, DML, false); @@ -142,6 +151,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationGetDml() throws Exception { checkOperations(GET, GET, DML, true); checkOperations(GET, GET, DML, false); @@ -150,6 +160,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedPut() throws Exception { checkOperations(SQL, GET, PUT, false); checkOperations(SQL, GET, PUT, true); @@ -160,6 +171,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedPut2() throws Exception { checkOperations(GET, SQL, PUT, false); checkOperations(GET, SQL, PUT, true); @@ -170,6 +182,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedDml() throws Exception { checkOperations(SQL, GET, DML, false); checkOperations(SQL, GET, DML, true); @@ -178,6 +191,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRepeatableReadIsolationMixedDml2() throws Exception { checkOperations(GET, SQL, DML, false); checkOperations(GET, SQL, DML, true); @@ -186,6 +200,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOperationConsistency() throws Exception { checkOperationsConsistency(PUT, false); checkOperationsConsistency(DML, false); @@ -198,6 +213,7 @@ public class MvccRepeatableReadBulkOpsTest extends CacheMvccAbstractTest { /** * @throws Exception If failed. */ + @Test public void testInvokeConsistency() throws Exception { Ignite node = grid(/*requestFromClient ? nodesCount() - 1 :*/ 0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java index 72f0396..72e877b 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/MvccRepeatableReadOperationsTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.cache.CacheEntryProcessor; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.GET; import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstractTest.ReadMode.SQL; @@ -36,6 +39,7 @@ import static org.apache.ignite.internal.processors.cache.mvcc.CacheMvccAbstract /** * Test basic mvcc cache operation operations. */ +@RunWith(JUnit4.class) public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsTest { /** {@inheritDoc} */ @Override protected Map<Integer, MvccTestAccount> getEntries( @@ -164,6 +168,7 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT * * @throws IgniteCheckedException If failed. */ + @Test public void testGetAndUpdateOperations() throws IgniteCheckedException { Ignite node1 = grid(0); @@ -225,6 +230,7 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT * * @throws IgniteCheckedException If failed. */ + @Test public void testPutIfAbsentConsistency() throws IgniteCheckedException { Ignite node1 = grid(0); @@ -265,6 +271,7 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT * * @throws IgniteCheckedException If failed. */ + @Test public void testReplaceConsistency() throws IgniteCheckedException { Ignite node1 = grid(0); @@ -309,4 +316,4 @@ public class MvccRepeatableReadOperationsTest extends MvccRepeatableReadBulkOpsT assertEquals(updateMap, getEntries(cache1, allKeys, SQL)); assertEquals(updateMap, getEntries(cache1, allKeys, GET)); } -} \ No newline at end of file +}
