http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java index 9505918..8215b0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePartitionStateTest.java @@ -41,6 +41,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.CacheWriteSynchronizationMode.FULL_SYNC; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.EVICTED; @@ -50,6 +53,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.topolo /** * */ +@RunWith(JUnit4.class) public class CachePartitionStateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -89,6 +93,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_1() throws Exception { partitionState1(0, true); } @@ -96,6 +101,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_2() throws Exception { partitionState1(1, true); } @@ -103,6 +109,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_2_NoCacheOnCoordinator() throws Exception { partitionState1(1, false); } @@ -110,6 +117,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState1_3() throws Exception { partitionState1(100, true); } @@ -117,6 +125,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_1() throws Exception { partitionState2(0, true); } @@ -124,6 +133,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_2() throws Exception { partitionState2(1, true); } @@ -131,6 +141,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_2_NoCacheOnCoordinator() throws Exception { partitionState2(1, false); } @@ -138,6 +149,7 @@ public class CachePartitionStateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionState2_3() throws Exception { partitionState2(100, true); }
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java index 57a150f..cc7d5ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CachePutAllFailoverAbstractTest.java @@ -38,12 +38,15 @@ import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; import org.jetbrains.annotations.NotNull; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final int NODE_CNT = 2; @@ -95,6 +98,7 @@ public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractS /** * @throws Exception If failed. */ + @org.junit.Test public void testPutAllFailover() throws Exception { testPutAllFailover(Test.PUT_ALL); } @@ -102,6 +106,7 @@ public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractS /** * @throws Exception If failed. */ + @org.junit.Test public void testPutAllFailoverPessimisticTx() throws Exception { if (atomicityMode() == CacheAtomicityMode.ATOMIC) return; @@ -112,6 +117,7 @@ public abstract class CachePutAllFailoverAbstractTest extends GridCacheAbstractS /** * @throws Exception If failed. */ + @org.junit.Test public void testPutAllFailoverAsync() throws Exception { testPutAllFailover(Test.PUT_ALL_ASYNC); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java index b21c95e..2e1fe2b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheRentingStateRepairTest.java @@ -34,12 +34,16 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.topology.Grid 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; import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; /** * */ +@RunWith(JUnit4.class) public class CacheRentingStateRepairTest extends GridCommonAbstractTest { /** */ public static final int PARTS = 1024; @@ -95,6 +99,7 @@ public class CacheRentingStateRepairTest extends GridCommonAbstractTest { /** * */ + @Test public void testRentingStateRepairAfterRestart() throws Exception { try { IgniteEx g0 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java index 0958f83..9aaa375 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheResultIsNotNullOnPartitionLossTest.java @@ -45,10 +45,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class CacheResultIsNotNullOnPartitionLossTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -126,6 +130,7 @@ public class CacheResultIsNotNullOnPartitionLossTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testCacheResultIsNotNullOnClient() throws Exception { testCacheResultIsNotNull0(client); } @@ -133,6 +138,7 @@ public class CacheResultIsNotNullOnPartitionLossTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testCacheResultIsNotNullOnLastServer() throws Exception { testCacheResultIsNotNull0(grid(SERVERS - 1)); } @@ -140,6 +146,7 @@ public class CacheResultIsNotNullOnPartitionLossTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testCacheResultIsNotNullOnServer() throws Exception { testCacheResultIsNotNull0(grid(SERVERS - 2)); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java index 54889e4..b0d0357 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheStartOnJoinTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryJoinRequestMessage; 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.testframework.MvccFeatureChecker.assertMvccWriteConflict; @@ -52,6 +55,7 @@ import static org.apache.ignite.testframework.MvccFeatureChecker.assertMvccWrite * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class CacheStartOnJoinTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -129,6 +133,7 @@ public class CacheStartOnJoinTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentClientsStart1() throws Exception { concurrentClientsStart(false); } @@ -136,6 +141,7 @@ public class CacheStartOnJoinTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentClientsStart2() throws Exception { concurrentClientsStart(true); } @@ -268,4 +274,4 @@ public class CacheStartOnJoinTest extends GridCommonAbstractTest { private void checkCache(Ignite node, final String cacheName) { assertNotNull(((IgniteKernal)node).context().cache().cache(cacheName)); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java index bccc703..59a9749 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheTryLockMultithreadedTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -69,8 +73,6 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); - super.beforeTestsStarted(); startGridsMultiThreaded(SRVS); @@ -80,9 +82,15 @@ public class CacheTryLockMultithreadedTest extends GridCommonAbstractTest { startGrid(SRVS); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); + } + /** * @throws Exception If failed. */ + @Test public void testTryLock() throws Exception { Ignite client = grid(SRVS); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java index e746b91..7c59c93 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC; import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC; @@ -36,6 +39,7 @@ import static org.junit.Assert.assertArrayEquals; /** * Tests for byte array values in distributed caches. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extends GridCacheAbstractByteArrayValuesSelfTest { /** */ @@ -132,6 +136,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend * * @throws Exception If failed. */ + @Test public void testPessimistic() throws Exception { testTransaction0(caches, PESSIMISTIC, KEY_1, wrap(1)); } @@ -141,6 +146,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend * * @throws Exception If failed. */ + @Test public void testPessimisticMixed() throws Exception { testTransactionMixed0(caches, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -150,6 +156,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend * * @throws Exception If failed. */ + @Test public void testOptimistic() throws Exception { testTransaction0(caches, OPTIMISTIC, KEY_1, wrap(1)); } @@ -159,6 +166,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend * * @throws Exception If failed. */ + @Test public void testOptimisticMixed() throws Exception { testTransactionMixed0(caches, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -168,6 +176,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend * * @throws Exception If failed. */ + @Test public void testPessimisticMvcc() throws Exception { testTransaction0(mvccCaches, PESSIMISTIC, KEY_1, wrap(1)); } @@ -177,6 +186,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend * * @throws Exception If failed. */ + @Test public void testPessimisticMvccMixed() throws Exception { testTransactionMixed0(mvccCaches, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1); } @@ -267,4 +277,4 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend assertNull(cache.get(key1)); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java index 5894359..0d98216 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractJobExecutionTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; 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.transactions.TransactionConcurrency.PESSIMISTIC; import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ; @@ -44,6 +47,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * Tests cache access from within jobs. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -97,6 +101,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testPessimisticRepeatableRead() throws Exception { checkTransactions(PESSIMISTIC, REPEATABLE_READ, 1000); } @@ -104,6 +109,7 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testPessimisticSerializable() throws Exception { checkTransactions(PESSIMISTIC, SERIALIZABLE, 1000); } @@ -192,4 +198,4 @@ public abstract class GridCacheAbstractJobExecutionTest extends GridCommonAbstra } } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java index 2116ecb..be36635 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; +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; @@ -59,6 +62,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Test node restart. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbstractTest { /** Cache name. */ protected static final String CACHE_NAME = "TEST_CACHE"; @@ -215,6 +219,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestart() throws Exception { rebalancMode = SYNC; partitions = 3; @@ -291,6 +296,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutTwoNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 2; @@ -307,6 +313,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxTwoNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 2; @@ -323,6 +330,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutTwoNodesOneBackup() throws Throwable { backups = 1; nodeCnt = 2; @@ -339,6 +347,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxTwoNodesOneBackup() throws Throwable { backups = 1; nodeCnt = 2; @@ -355,6 +364,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutFourNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 4; @@ -371,6 +381,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxFourNodesNoBackups() throws Throwable { backups = 0; nodeCnt = 4; @@ -387,6 +398,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutFourNodesOneBackups() throws Throwable { backups = 1; nodeCnt = 4; @@ -403,6 +415,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutFourNodesOneBackupsOffheapEvict() throws Throwable { backups = 1; nodeCnt = 4; @@ -419,6 +432,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxFourNodesOneBackups() throws Throwable { backups = 1; nodeCnt = 4; @@ -435,6 +449,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxFourNodesOneBackupsOffheapEvict() throws Throwable { backups = 1; nodeCnt = 4; @@ -451,6 +466,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutSixNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 6; @@ -467,6 +483,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxSixNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 6; @@ -483,6 +500,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutEightNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 8; @@ -499,6 +517,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxEightNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 8; @@ -515,6 +534,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithPutTenNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 10; @@ -531,6 +551,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxTenNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 10; @@ -547,6 +568,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 10; @@ -563,6 +585,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { backups = 2; nodeCnt = 4; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java index 824cdf5..7842944 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java @@ -46,4 +46,4 @@ public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extend * @return Distribution mode. */ protected abstract NearCacheConfiguration nearConfiguration(); -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java index f6b9302..44fe61f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPrimarySyncSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; 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; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -38,6 +41,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Test ensuring that PRIMARY_SYNC mode works correctly. */ +@RunWith(JUnit4.class) public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbstractTest { /** Grids count. */ private static final int GRID_CNT = 3; @@ -71,14 +75,17 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - if (nearConfiguration() != null) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - assert GRID_CNT > 1; startGrids(GRID_CNT); } + /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (nearConfiguration() != null) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + /** * @return Distribution mode. */ @@ -87,6 +94,7 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testPrimarySync() throws Exception { for (int i = 0; i < GRID_CNT; i++) { for (int j = 0; j < GRID_CNT; j++) { @@ -106,4 +114,4 @@ public abstract class GridCacheAbstractPrimarySyncSelfTest extends GridCommonAbs } } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java index 0398813..90e90c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -46,6 +49,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED /** * Simple cache test. */ +@RunWith(JUnit4.class) public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTest { /** Grid 1. */ private static Ignite ignite1; @@ -74,11 +78,6 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - - if (MvccFeatureChecker.forcedMvcc()) - fail("https://issues.apache.org/jira/browse/IGNITE-7952"); - startGridsMultiThreaded(3); ignite1 = grid(0); @@ -95,6 +94,11 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + + if (MvccFeatureChecker.forcedMvcc()) + fail("https://issues.apache.org/jira/browse/IGNITE-7952"); + for (Ignite g : G.allGrids()) g.cache(DEFAULT_CACHE_NAME).clear(); } @@ -103,6 +107,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes * * @throws Exception If error occur. */ + @Test public void testBasicOps() throws Exception { CountDownLatch latch = new CountDownLatch(3); @@ -178,6 +183,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes /** * @throws Exception If test fails. */ + @Test public void testBasicOpsAsync() throws Exception { CountDownLatch latch = new CountDownLatch(3); @@ -258,6 +264,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes * * @throws IgniteCheckedException If test fails. */ + @Test public void testOptimisticTransaction() throws Exception { CountDownLatch latch = new CountDownLatch(9); @@ -332,6 +339,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes * * @throws Exception In case of error. */ + @Test public void testPutWithExpiration() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.EXPIRATION); @@ -398,4 +406,4 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes return true; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java index 9316c2d..0bf51f6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.MvccFeatureChecker; +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; @@ -38,6 +41,7 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests near-only cache. */ +@RunWith(JUnit4.class) public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbstractSelfTest { /** Grid cnt. */ private static AtomicInteger gridCnt; @@ -64,6 +68,12 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst } /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + } + + /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); @@ -113,6 +123,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst /** * @throws Exception If failed. */ + @Test public void testPutFromClientNode() throws Exception { IgniteCache<Object, Object> nearOnly = nearOnlyCache(); @@ -155,6 +166,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst /** * @throws Exception If failed. */ + @Test public void testGetFromClientNode() throws Exception { IgniteCache<Object, Object> dht = dhtCache(); @@ -194,6 +206,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst /** * @throws Exception If failed. */ + @Test public void testNearOnlyAffinity() throws Exception { for (int i = 0; i < gridCount(); i++) { Ignite g = grid(i); @@ -282,4 +295,4 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst this.val = val; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java index aea6ce6..cb830ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetAbstractSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.cache.CacheWriteSynchronizationMode; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; 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; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -36,6 +39,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 2; @@ -61,6 +65,7 @@ public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstrac /** * @throws Exception If failed. */ + @Test public void testEntrySet() throws Exception { for (int i = 0; i < 10; i++) { log.info("Iteration: " + i); @@ -114,4 +119,4 @@ public abstract class GridCacheEntrySetAbstractSelfTest extends GridCacheAbstrac tx.commit(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java index 53d3a7a..160f8fc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEntrySetIterationPreloadingSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.cache.CacheRebalanceMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests entry wrappers after preloading happened. */ +@RunWith(JUnit4.class) public class GridCacheEntrySetIterationPreloadingSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -63,6 +67,7 @@ public class GridCacheEntrySetIterationPreloadingSelfTest extends GridCacheAbstr /** * @throws Exception If failed. */ + @Test public void testIteration() throws Exception { try { final IgniteCache<String, Integer> cache = jcache(); @@ -93,4 +98,4 @@ public class GridCacheEntrySetIterationPreloadingSelfTest extends GridCacheAbstr stopGrid(1); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java index 9183476..404918f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheEventAbstractTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.lang.IgniteBiTuple; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.MvccFeatureChecker; 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.events.EventType.EVTS_CACHE; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -53,6 +56,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Tests events. */ +@RunWith(JUnit4.class) public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTest { /** */ private static final boolean TEST_INFO = true; @@ -78,8 +82,6 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - super.beforeTestsStarted(); gridCnt = gridCount(); @@ -92,6 +94,8 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + super.beforeTest(); if (TEST_INFO) @@ -225,6 +229,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe * Note: test was disabled for REPPLICATED cache case because IGNITE-607. * This comment should be removed if test passed stably. */ + @Test public void testGetPutRemove() throws Exception { runTest( new TestCacheRunnable() { @@ -252,6 +257,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveTx1() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -285,6 +291,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveTx2() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -325,6 +332,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe * Note: test was disabled for REPPLICATED cache case because IGNITE-607. * This comment should be removed if test passed stably. */ + @Test public void testGetPutRemoveAsync() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -351,6 +359,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveAsyncTx1() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -384,6 +393,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testGetPutRemoveAsyncTx2() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -421,6 +431,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testPutRemovex() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -445,6 +456,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testPutRemovexTx1() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -475,6 +487,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testPutRemovexTx2() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -510,6 +523,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testPutIfAbsent() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -541,6 +555,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testPutIfAbsentTx() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -579,6 +594,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe /** * @throws Exception If test failed. */ + @Test public void testPutIfAbsentAsync() throws Exception { runTest(new TestCacheRunnable() { @Override public void run(IgniteCache<String, Integer> cache) throws IgniteCheckedException { @@ -613,6 +629,7 @@ public abstract class GridCacheEventAbstractTest extends GridCacheAbstractSelfTe * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testPutIfAbsentAsyncTx() throws Exception { IgniteBiTuple[] evts = new IgniteBiTuple[] {F.t(EVT_CACHE_OBJECT_PUT, 2 * gridCnt)}; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java index 5909213..9663864 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheLockAbstractTest.java @@ -41,6 +41,10 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Before; +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.CacheRebalanceMode.SYNC; @@ -50,6 +54,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC; * Test cases for multi-threaded tests. */ @SuppressWarnings({"FieldCanBeLocal"}) +@RunWith(JUnit4.class) public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { /** Grid1. */ private static Ignite ignite1; @@ -67,6 +72,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -203,6 +209,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { * @throws Exception If test failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testLockSingleThread() throws Exception { int k = 1; String v = String.valueOf(k); @@ -237,6 +244,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testLock() throws Exception { final int kv = 1; @@ -327,6 +335,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testLockAndPut() throws Exception { final CountDownLatch l1 = new CountDownLatch(1); final CountDownLatch l2 = new CountDownLatch(1); @@ -412,6 +421,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testLockTimeoutTwoThreads() throws Exception { int keyCnt = 1; @@ -507,6 +517,7 @@ public abstract class GridCacheLockAbstractTest extends GridCommonAbstractTest { /** * @throws Throwable If failed. */ + @Test public void testLockReentrancy() throws Throwable { Affinity<Integer> aff = ignite1.affinity(DEFAULT_CACHE_NAME); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java index bd309fa..abfff2a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMixedModeSelfTest.java @@ -24,12 +24,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests cache puts in mixed mode. * * TODO IGNITE-10345: Remove test in ignite 3.0. */ +@RunWith(JUnit4.class) public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -65,6 +69,7 @@ public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBasicOps() throws Exception { IgniteCache<Object, Object> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -80,4 +85,4 @@ public class GridCacheMixedModeSelfTest extends GridCommonAbstractTest { for (int i = 0; i < 1000; i++) assertNull(cache.get(i)); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java index 0d1aff9..89bc166 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java @@ -37,6 +37,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.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -48,6 +51,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_UNLOCKED; /** * Multi-node cache test. */ +@RunWith(JUnit4.class) public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractTest { /** Grid 1. */ private static Ignite ignite1; @@ -88,8 +92,6 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - ignite1 = startGrid(1); ignite2 = startGrid(2); ignite3 = startGrid(3); @@ -100,6 +102,11 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT } /** {@inheritDoc} */ + @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); + } + + /** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { cache1 = null; cache2 = null; @@ -147,6 +154,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test failed. */ + @Test public void testBasicPut() throws Exception { checkPuts(3, ignite1); } @@ -154,6 +162,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test fails. */ + @Test public void testMultiNodePut() throws Exception { checkPuts(1, ignite1, ignite2, ignite3); checkPuts(1, ignite2, ignite1, ignite3); @@ -163,6 +172,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test fails. */ + @Test public void testMultiValuePut() throws Exception { checkPuts(1, ignite1); } @@ -170,6 +180,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test fails. */ + @Test public void testMultiValueMultiNodePut() throws Exception { checkPuts(3, ignite1, ignite2, ignite3); checkPuts(3, ignite2, ignite1, ignite3); @@ -232,6 +243,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test failed. */ + @Test public void testLockUnlock() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -280,6 +292,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test failed. */ + @Test public void testConcurrentPutAsync() throws Exception { CountDownLatch latch = new CountDownLatch(9); @@ -330,6 +343,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT /** * @throws Exception If test failed. */ + @Test public void testGlobalClearAll() throws Exception { cache1.put(1, "val1"); cache2.put(2, "val2"); @@ -417,4 +431,4 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT "grid", ignite != null ? ignite.name() : "N/A", "evts", evts); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java index 6636196..4559762 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java @@ -41,6 +41,10 @@ import org.apache.ignite.testframework.GridTestThread; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVTS_CACHE; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_UNLOCKED; @@ -48,6 +52,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_UNLOCKED; /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstractTest { /** */ private static final String CACHE2 = "cache2"; @@ -65,6 +70,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr private static Collection<IgnitePredicate<Event>> lsnrs = new ArrayList<>(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -234,6 +240,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr * * @throws Exception If test failed. */ + @Test public void testBasicLock() throws Exception { IgniteCache<Integer, String> cache = ignite1.cache(DEFAULT_CACHE_NAME); @@ -275,6 +282,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr /** * @throws Exception If test fails. */ + @Test public void testMultiNodeLock() throws Exception { IgniteCache<Integer, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME); IgniteCache<Integer, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME); @@ -333,6 +341,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr /** * @throws Exception If test fails. */ + @Test public void testMultiNodeLockWithKeyLists() throws Exception { IgniteCache<Integer, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME); IgniteCache<Integer, String> cache2 = ignite2.cache(DEFAULT_CACHE_NAME); @@ -410,6 +419,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr /** * @throws IgniteCheckedException If test failed. */ + @Test public void testLockReentry() throws IgniteCheckedException { IgniteCache<Integer, String> cache = ignite1.cache(DEFAULT_CACHE_NAME); @@ -438,6 +448,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr /** * @throws Exception If test failed. */ + @Test public void testLockMultithreaded() throws Exception { final IgniteCache<Integer, String> cache = ignite1.cache(DEFAULT_CACHE_NAME); @@ -556,6 +567,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testTwoCaches() throws Exception { IgniteCache<Integer, String> cache1 = ignite1.cache(DEFAULT_CACHE_NAME); IgniteCache<Integer, String> cache2 = ignite1.cache(CACHE2); @@ -625,4 +637,4 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr return true; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java index 5379593..8d5c875 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java @@ -61,6 +61,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +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; @@ -71,6 +74,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Base test for all multithreaded cache scenarios w/ and w/o failover. */ +@RunWith(JUnit4.class) public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstractTest { /** Node name prefix. */ private static final String NODE_PREFIX = "node"; @@ -240,6 +244,7 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra * * @throws Exception If failed. */ + @Test public void test() throws Exception { startUp(); @@ -599,4 +604,4 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra return !failed; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java index 6375e3e..9b82354 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java @@ -42,6 +42,10 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteState.STOPPED; import static org.apache.ignite.IgniteSystemProperties.IGNITE_TX_SALVAGE_TIMEOUT; @@ -57,6 +61,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * Tests for node failure in transactions. */ +@RunWith(JUnit4.class) public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstractTest { /** Random number generator. */ private static final Random RAND = new Random(); @@ -77,6 +82,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac private static final List<Ignite> IGNITEs = new ArrayList<>(); /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -145,10 +151,11 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac /** * @throws IgniteCheckedException If test failed. - * + * * Note: test was disabled for REPPLICATED cache case because IGNITE-601. * This comment should be removed if test passed stably. */ + @Test public void testPessimisticReadCommitted() throws Throwable { checkTransaction(PESSIMISTIC, READ_COMMITTED); } @@ -156,6 +163,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticRepeatableRead() throws Throwable { checkTransaction(PESSIMISTIC, REPEATABLE_READ); } @@ -163,6 +171,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac /** * @throws IgniteCheckedException If test failed. */ + @Test public void testPessimisticSerializable() throws Throwable { checkTransaction(PESSIMISTIC, SERIALIZABLE); } @@ -240,10 +249,11 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac /** * @throws Exception If check failed. - * + * * Note: test was disabled for REPPLICATED cache case because IGNITE-601. * This comment should be removed if test passed stably. */ + @Test public void testLock() throws Exception { int idx = 0; @@ -301,4 +311,4 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac assert !checkCache.isLocalLocked(KEY, false); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java index 5a9e86a..408a4fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionEvictionDuringReadThroughSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException; 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; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionEvictionDuringReadThroughSelfTest extends GridCommonAbstractTest { /** Failing key. */ private static final int FAILING_KEY = 3; @@ -83,6 +87,7 @@ public class GridCachePartitionEvictionDuringReadThroughSelfTest extends GridCom /** * @throws Exception if failed. */ + @Test public void testPartitionRent() throws Exception { startGrid(DATA_READ_GRID_IDX); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java index 4091b73..931a6f3 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionNotLoadedEventSelfTest.java @@ -43,6 +43,9 @@ import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.util.TestTcpCommunicationSpi; +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; @@ -50,6 +53,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -58,10 +62,8 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract private int backupCnt; /** {@inheritDoc} */ - @Override public void beforeTestsStarted() throws Exception { + @Override public void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -106,6 +108,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testPrimaryAndBackupDead() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-5968"); @@ -166,6 +169,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testPrimaryDead() throws Exception { startGrid(0); startGrid(1); @@ -200,6 +204,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStableTopology() throws Exception { backupCnt = 1; @@ -236,6 +241,7 @@ public class GridCachePartitionNotLoadedEventSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testMapPartitioned() throws Exception { backupCnt = 0; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java index d718644..1c4958f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java @@ -40,6 +40,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.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -47,6 +50,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Check reloadAll() on partitioned cache. */ +@RunWith(JUnit4.class) public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends GridCommonAbstractTest { /** Amount of nodes in the grid. */ private static final int GRID_CNT = 4; @@ -175,6 +179,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid /** * @throws Exception If test failed. */ + @Test public void testReloadAll() throws Exception { // Fill caches with values. for (IgniteCache<Integer, String> cache : caches) { @@ -203,4 +208,4 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid } } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java index 0148804..056b72a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadEventsAbstractSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi; import org.apache.ignite.testframework.MvccFeatureChecker; 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; @@ -43,15 +46,14 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_OBJECT_LOAD /** * */ +@RunWith(JUnit4.class) public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -103,6 +105,7 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA /** * @throws Exception if failed. */ + @Test public void testPreloadEvents() throws Exception { Ignite g1 = startGrid("g1"); @@ -138,4 +141,4 @@ public abstract class GridCachePreloadEventsAbstractSelfTest extends GridCommonA assertTrue("Unexpected key: " + cacheEvt.key(), keys.contains(cacheEvt.key())); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java index 8ef5fb8..40be83f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java @@ -29,6 +29,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.MvccFeatureChecker; 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; @@ -42,6 +45,7 @@ import static org.apache.ignite.configuration.DeploymentMode.CONTINUOUS; /** * Test node restart. */ +@RunWith(JUnit4.class) public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommonAbstractTest { /** Flag for debug output. */ private static final boolean DEBUG = false; @@ -98,14 +102,6 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - if (nearEnabled()) - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); - } - - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration c = super.getConfiguration(igniteInstanceName); @@ -143,6 +139,9 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + if (nearEnabled()) + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + backups = DFLT_BACKUPS; partitions = DFLT_PARTITIONS; preloadMode = ASYNC; @@ -187,6 +186,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon /** * @throws Exception If failed. */ + @Test public void testSyncPreloadRestart() throws Exception { preloadMode = SYNC; @@ -196,6 +196,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon /** * @throws Exception If failed. */ + @Test public void testAsyncPreloadRestart() throws Exception { preloadMode = ASYNC; @@ -205,6 +206,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon /** * @throws Exception If failed. */ + @Test public void testDisabledPreloadRestart() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -321,4 +323,4 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon error("Attempt: " + attempt); error("Node: " + c.unwrap(Ignite.class).cluster().localNode().id()); } -} \ No newline at end of file +}
