http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java index 51c2fc2..71daeca 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheRendezvousAffinityClientSelfTest.java @@ -32,10 +32,14 @@ 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 rendezvous affinity function with CLIENT_ONLY node (GG-8768). */ +@RunWith(JUnit4.class) public class GridCacheRendezvousAffinityClientSelfTest extends GridCommonAbstractTest { /** Client node. */ private boolean client; @@ -63,6 +67,7 @@ public class GridCacheRendezvousAffinityClientSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testClientNode() throws Exception { try { client = true; @@ -111,4 +116,4 @@ public class GridCacheRendezvousAffinityClientSelfTest extends GridCommonAbstrac stopAllGrids(); } } -} \ 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/near/GridNearCacheStoreUpdateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java index 02a9223..6a70afa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheStoreUpdateTest.java @@ -43,10 +43,14 @@ import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; 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; /** * Check that near cache is updated when entry loaded from store. */ +@RunWith(JUnit4.class) public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; @@ -61,14 +65,6 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { private IgniteCache<String, String> cache; /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); - - super.beforeTestsStarted(); - } - - /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(final String gridName) throws Exception { final IgniteConfiguration cfg = super.getConfiguration(gridName); @@ -80,6 +76,9 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); + srv = startGrid("server"); client = startGrid("client"); } @@ -92,6 +91,7 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testAtomicUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration(), new NearCacheConfiguration<String, String>()); @@ -101,6 +101,7 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testTransactionAtomicUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration(), new NearCacheConfiguration<String, String>()); @@ -110,6 +111,7 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testPessimisticRepeatableReadUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL), new NearCacheConfiguration<String, String>()); @@ -120,6 +122,7 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testPessimisticReadCommittedUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL), new NearCacheConfiguration<String, String>()); @@ -130,6 +133,7 @@ public class GridNearCacheStoreUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If fail. */ + @Test public void testOptimisticSerializableUpdateNear() throws Exception { cache = client.createCache(cacheConfiguration().setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL), new NearCacheConfiguration<String, String>()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java index f9c8ac0..fd9a5bb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java @@ -29,6 +29,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; @@ -36,6 +39,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test that persistent store is not used when loading invalidated entry from backup node. */ +@RunWith(JUnit4.class) public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -101,6 +105,7 @@ public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBackupLoad() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).put(1, 1); @@ -158,4 +163,4 @@ public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest { return map.get(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/near/IgniteCacheNearOnlyTxTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java index d86fa91..7fda3ec 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearOnlyTxTest.java @@ -31,6 +31,10 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; +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.transactions.TransactionConcurrency.OPTIMISTIC; @@ -40,8 +44,10 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -84,6 +90,7 @@ public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearOnlyPutMultithreaded() throws Exception { final Ignite ignite1 = ignite(1); @@ -121,6 +128,7 @@ public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOptimisticTx() throws Exception { txMultithreaded(true); } @@ -128,6 +136,7 @@ public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPessimisticTx() throws Exception { txMultithreaded(false); } @@ -182,6 +191,7 @@ public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentTx() throws Exception { final Ignite ignite1 = ignite(1); @@ -225,4 +235,4 @@ public class IgniteCacheNearOnlyTxTest extends IgniteCacheAbstractTest { fut1.get(); fut2.get(); } -} \ 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/near/IgniteCacheNearReadCommittedTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java index 76f0d17..0112c06 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java @@ -24,6 +24,10 @@ import org.apache.ignite.configuration.NearCacheConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; import org.apache.ignite.testframework.MvccFeatureChecker; import org.apache.ignite.transactions.Transaction; +import org.junit.Before; +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.transactions.TransactionConcurrency.PESSIMISTIC; @@ -33,8 +37,10 @@ import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED * */ @SuppressWarnings("RedundantMethodOverride") +@RunWith(JUnit4.class) public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -59,6 +65,7 @@ public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest /** * @throws Exception If failed. */ + @Test public void testReadCommittedCacheCleanup() throws Exception { IgniteCache<Integer, Integer> cache = ignite(0).cache(DEFAULT_CACHE_NAME); @@ -78,4 +85,4 @@ public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest assertEquals(0, cache.localSize(CachePeekMode.ALL)); } -} \ 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/near/IgniteCacheNearTxRollbackTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java index 06b6256..27e2781 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearTxRollbackTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.lang.IgniteInClosure; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; +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; @@ -41,6 +44,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -74,6 +78,7 @@ public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutAllRollback() throws Exception { IgniteCache<Integer, Integer> cache = jcache(0); @@ -135,4 +140,4 @@ public class IgniteCacheNearTxRollbackTest extends IgniteCacheAbstractTest { super.sendMessage(node, msg, ackClosure); } } -} \ 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/near/NearCacheMultithreadedUpdateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java index 703da8a..dd31cdd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheMultithreadedUpdateTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -40,6 +43,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -77,6 +81,7 @@ public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedTx() throws Exception { updateMultithreaded(TRANSACTIONAL, false); } @@ -84,6 +89,7 @@ public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedTxRestart() throws Exception { updateMultithreaded(TRANSACTIONAL, true); } @@ -91,6 +97,7 @@ public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedAtomic() throws Exception { updateMultithreaded(ATOMIC, false); } @@ -98,6 +105,7 @@ public class NearCacheMultithreadedUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateMultithreadedAtomicRestart() throws Exception { updateMultithreaded(ATOMIC, true); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java index ca60060..4d4f7ac 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCachePutAllMultinodeTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -44,6 +47,7 @@ import static org.apache.ignite.testframework.GridTestUtils.runMultiThreaded; /** * */ +@RunWith(JUnit4.class) public class NearCachePutAllMultinodeTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -112,6 +116,7 @@ public class NearCachePutAllMultinodeTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultithreadedPutAll() throws Exception { final AtomicInteger idx = new AtomicInteger(); @@ -163,4 +168,4 @@ public class NearCachePutAllMultinodeTest extends GridCommonAbstractTest { }; } } -} \ 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/near/NearCacheSyncUpdateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java index e1ca01f..a1a2a28 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NearCacheSyncUpdateTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -41,6 +44,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class NearCacheSyncUpdateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -71,6 +75,7 @@ public class NearCacheSyncUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearCacheSyncUpdateAtomic() throws Exception { nearCacheSyncUpdateTx(ATOMIC); } @@ -78,6 +83,7 @@ public class NearCacheSyncUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearCacheSyncUpdateTx() throws Exception { nearCacheSyncUpdateTx(TRANSACTIONAL); } @@ -85,6 +91,7 @@ public class NearCacheSyncUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNearCacheSyncUpdateMvccTx() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-7187"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java index 109dbff..d46a6fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/NoneRebalanceModeSelfTest.java @@ -22,6 +22,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteKernal; import org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtLocalPartition; 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.CacheRebalanceMode.NONE; import static org.apache.ignite.internal.processors.cache.distributed.dht.topology.GridDhtPartitionState.OWNING; @@ -29,6 +32,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.topolo /** * Test none rebalance mode. */ +@RunWith(JUnit4.class) public class NoneRebalanceModeSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -60,6 +64,7 @@ public class NoneRebalanceModeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoveAll() throws Exception { GridNearTransactionalCache cache = (GridNearTransactionalCache)((IgniteKernal)grid(0)).internalCache(DEFAULT_CACHE_NAME); @@ -68,4 +73,4 @@ public class NoneRebalanceModeSelfTest extends GridCommonAbstractTest { grid(0).cache(DEFAULT_CACHE_NAME).removeAll(); } -} \ 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/rebalancing/CacheManualRebalancingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java index eb090a8..a42ed6f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/CacheManualRebalancingTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** */ +@RunWith(JUnit4.class) public class CacheManualRebalancingTest extends GridCommonAbstractTest { /** */ private static final String MYCACHE = "mycache"; @@ -90,6 +94,7 @@ public class CacheManualRebalancingTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRebalance() throws Exception { // Fill cache with large dataset to make rebalancing slow. try (IgniteDataStreamer<Object, Object> streamer = grid(0).dataStreamer(MYCACHE)) { @@ -143,7 +148,7 @@ public class CacheManualRebalancingTest extends GridCommonAbstractTest { assertNotNull(cache); boolean finished; - + log.info("Start rebalancing cache: " + cacheName + ", size: " + cache.localSize()); do { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java index 96127aa..1f2827d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRabalancingDelayedPartitionMapExchangeSelfTest.java @@ -40,10 +40,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRabalancingDelayedPartitionMapExchangeSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -119,6 +123,7 @@ public class GridCacheRabalancingDelayedPartitionMapExchangeSelfTest extends Gri /** * @throws Exception e if failed. */ + @Test public void test() throws Exception { IgniteEx ignite = 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/rebalancing/GridCacheRebalancingAsyncSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java index 0a8698a..15830fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingAsyncSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemander; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TestTcpDiscoverySpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingAsyncSelfTest extends GridCacheRebalancingSyncSelfTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -43,6 +47,7 @@ public class GridCacheRebalancingAsyncSelfTest extends GridCacheRebalancingSyncS /** * @throws Exception Exception. */ + @Test public void testNodeFailedAtRebalancing() throws Exception { IgniteEx ignite = startGrid(0); @@ -65,4 +70,4 @@ public class GridCacheRebalancingAsyncSelfTest extends GridCacheRebalancingSyncS checkSupplyContextMapIsEmpty(); } -} \ 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/rebalancing/GridCacheRebalancingCancelTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java index d61b9bb..e1ef14e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingCancelTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cases for checking cancellation rebalancing process if some events occurs. */ +@RunWith(JUnit4.class) public class GridCacheRebalancingCancelTest extends GridCommonAbstractTest { /** */ private static final String DHT_PARTITIONED_CACHE = "cacheP"; @@ -63,6 +67,7 @@ public class GridCacheRebalancingCancelTest extends GridCommonAbstractTest { * * @throws Exception Exception. */ + @Test public void testClientNodeJoinAtRebalancing() throws Exception { final IgniteEx ignite0 = 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/rebalancing/GridCacheRebalancingOrderingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java index d3a0807..ea3784a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingOrderingTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.services.ServiceConfiguration; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -102,6 +105,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; * </li> * </ol> */ +@RunWith(JUnit4.class) public class GridCacheRebalancingOrderingTest extends GridCommonAbstractTest { /** {@link Random} for test key generation. */ private static final Random RANDOM = new Random(); @@ -268,6 +272,7 @@ public class GridCacheRebalancingOrderingTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEvents() throws Exception { Ignite ignite = 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/rebalancing/GridCacheRebalancingPartitionCountersTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java index 6523eb9..912b383 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionCountersTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.topology.Grid import org.apache.ignite.internal.util.typedef.internal.CU; import org.apache.ignite.internal.util.typedef.internal.U; 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 GridCacheRebalancingPartitionCountersTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; @@ -102,6 +106,7 @@ public class GridCacheRebalancingPartitionCountersTest extends GridCommonAbstrac /** * Tests that after rebalancing all partition update counters have the same value on all nodes. */ + @Test public void test() throws Exception { IgniteEx ignite = (IgniteEx)startGrids(3); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java index f0cbd38..ec5d0d0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingPartitionDistributionTest.java @@ -33,11 +33,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.assertions.Assertion; import org.apache.ignite.testframework.junits.common.GridRollingRestartAbstractTest; - +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test the behavior of the partition rebalancing during a rolling restart. */ +@RunWith(JUnit4.class) public class GridCacheRebalancingPartitionDistributionTest extends GridRollingRestartAbstractTest { /** The maximum allowable deviation from a perfect distribution. */ private static final double MAX_DEVIATION = 0.20; @@ -60,6 +63,7 @@ public class GridCacheRebalancingPartitionDistributionTest extends GridRollingRe * The test performs rolling restart and checks no server drops out and the partitions are balanced during * redistribution. */ + @Test public void testRollingRestart() throws InterruptedException { awaitPartitionMapExchange(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java index ccadfbd..aa9d9f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncCheckDataTest.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.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.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -36,6 +39,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingSyncCheckDataTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -59,6 +63,7 @@ public class GridCacheRebalancingSyncCheckDataTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testDataRebalancing() throws Exception { Ignite ignite = 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/rebalancing/GridCacheRebalancingSyncSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java index 4f45ccc..f584ba6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingSyncSelfTest.java @@ -62,6 +62,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.GridTestUtils.SF; 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.CacheMode.LOCAL; import static org.apache.ignite.cache.CacheRebalanceMode.NONE; @@ -69,6 +72,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.NONE; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -262,6 +266,7 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSimpleRebalancing() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10560"); @@ -316,6 +321,7 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadRebalancing() throws Exception { final Ignite ignite = startGrid(0); @@ -503,6 +509,7 @@ public class GridCacheRebalancingSyncSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testComplexRebalancing() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10561"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java index de09e27..389bf8f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingUnmarshallingFailedSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingUnmarshallingFailedSelfTest extends GridCommonAbstractTest { /** */ protected static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -120,6 +124,7 @@ public class GridCacheRebalancingUnmarshallingFailedSelfTest extends GridCommonA /** * @throws Exception e. */ + @Test public void test() throws Exception { String marshClsName = GridTestProperties.getProperty(GridTestProperties.MARSH_CLASS_NAME); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java index 2b69439..852b86a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/GridCacheRebalancingWithAsyncClearingTest.java @@ -39,10 +39,14 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.GridTestUtils.SF; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; @@ -107,6 +111,7 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac * * @throws Exception If failed. */ + @Test public void testPartitionClearingNotBlockExchange() throws Exception { System.setProperty(IgniteSystemProperties.IGNITE_PDS_MAX_CHECKPOINT_MEMORY_HISTORY_SIZE, "1"); @@ -203,6 +208,7 @@ public class GridCacheRebalancingWithAsyncClearingTest extends GridCommonAbstrac * * @throws Exception If failed. */ + @Test public void testCorrectRebalancingCurrentlyRentingPartitions() throws Exception { IgniteEx ignite = (IgniteEx) startGrids(3); ignite.cluster().active(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java index 97f8d45..eb7a1ab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/rebalancing/IgniteRebalanceOnCachesStoppingOrDestroyingTest.java @@ -53,10 +53,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonAbstractTest { /** */ private static final String CACHE_1 = "cache_1"; @@ -131,6 +135,7 @@ public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonA /** * */ + @Test public void testStopCachesOnDeactivation() throws Exception { performTest(ig -> { ig.cluster().active(false); @@ -145,6 +150,7 @@ public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonA /** * */ + @Test public void testDestroySpecificCachesInDifferentCacheGroups() throws Exception { performTest(ig -> { ig.destroyCaches(Arrays.asList(CACHE_1, CACHE_3)); @@ -156,6 +162,7 @@ public class IgniteRebalanceOnCachesStoppingOrDestroyingTest extends GridCommonA /** * */ + @Test public void testDestroySpecificCacheAndCacheGroup() throws Exception { performTest(ig -> { ig.destroyCaches(Arrays.asList(CACHE_1, CACHE_3, CACHE_4)); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java index 0595f7d..c37e814 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java @@ -19,12 +19,16 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.internal.processors.cache.distributed.GridCacheLockAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Test cases for multi-threaded tests. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedLockSelfTest extends GridCacheLockAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -32,7 +36,8 @@ public class GridCacheReplicatedLockSelfTest extends GridCacheLockAbstractTest { } /** {@inheritDoc} */ + @Test @Override public void testLockReentrancy() throws Throwable { fail("https://issues.apache.org/jira/browse/IGNITE-835"); } -} \ 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/replicated/GridCacheReplicatedNodeRestartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java index bff8755..fde81ce 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedNodeRestartSelfTest.java @@ -19,6 +19,9 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractNodeRestartSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -27,6 +30,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests node restart. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNodeRestartSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration() { @@ -55,81 +59,97 @@ public class GridCacheReplicatedNodeRestartSelfTest extends GridCacheAbstractNod } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutTwoNodesNoBackups() throws Throwable { super.testRestartWithPutTwoNodesNoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutTwoNodesOneBackup() throws Throwable { // No-op. } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutFourNodesOneBackups() throws Throwable { super.testRestartWithPutFourNodesOneBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutFourNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutSixNodesTwoBackups() throws Throwable { super.testRestartWithPutSixNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutEightNodesTwoBackups() throws Throwable { super.testRestartWithPutEightNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithPutTenNodesTwoBackups() throws Throwable { super.testRestartWithPutTenNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxTwoNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxTwoNodesOneBackup() throws Throwable { super.testRestartWithTxTwoNodesOneBackup(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxFourNodesOneBackups() throws Throwable { super.testRestartWithTxFourNodesOneBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxFourNodesNoBackups() throws Throwable { // No-op. } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxSixNodesTwoBackups() throws Throwable { super.testRestartWithTxSixNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxEightNodesTwoBackups() throws Throwable { super.testRestartWithTxEightNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxTenNodesTwoBackups() throws Throwable { super.testRestartWithTxTenNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxPutAllTenNodesTwoBackups() throws Throwable { super.testRestartWithTxPutAllTenNodesTwoBackups(); } /** {@inheritDoc} */ + @Test @Override public void testRestartWithTxPutAllFourNodesTwoBackups() throws Throwable { super.testRestartWithTxPutAllFourNodesTwoBackups(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java index ae97c0b..35b8d9b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedTxMultiNodeBasicTest.java @@ -20,6 +20,9 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.IgniteTxMultiNodeAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -27,6 +30,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test basic cache operations in transactions. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedTxMultiNodeBasicTest extends IgniteTxMultiNodeAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -44,36 +48,43 @@ public class GridCacheReplicatedTxMultiNodeBasicTest extends IgniteTxMultiNodeAb } /** {@inheritDoc} */ + @Test @Override public void testPutOneEntryInTx() throws Exception { super.testPutOneEntryInTx(); } /** {@inheritDoc} */ + @Test @Override public void testPutTwoEntriesInTx() throws Exception { super.testPutTwoEntriesInTx(); } /** {@inheritDoc} */ + @Test @Override public void testPutOneEntryInTxMultiThreaded() throws Exception { super.testPutOneEntryInTxMultiThreaded(); } /** {@inheritDoc} */ + @Test @Override public void testPutTwoEntryInTxMultiThreaded() throws Exception { super.testPutTwoEntryInTxMultiThreaded(); } /** {@inheritDoc} */ + @Test @Override public void testRemoveInTxQueried() throws Exception { super.testRemoveInTxQueried(); } /** {@inheritDoc} */ + @Test @Override public void testRemoveInTxSimple() throws Exception { super.testRemoveInTxSimple(); } /** {@inheritDoc} */ + @Test @Override public void testRemoveInTxQueriedMultiThreaded() throws Exception { super.testRemoveInTxQueriedMultiThreaded(); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java index e55a434..239948a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheSyncReplicatedPreloadSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -37,6 +40,7 @@ import static org.apache.ignite.configuration.DeploymentMode.CONTINUOUS; /** * Multithreaded tests for replicated cache preloader. */ +@RunWith(JUnit4.class) public class GridCacheSyncReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -86,6 +90,7 @@ public class GridCacheSyncReplicatedPreloadSelfTest extends GridCommonAbstractTe * @throws Exception If test failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testNodeRestart() throws Exception { int keyCnt = 1000; int retries = 20; @@ -116,6 +121,7 @@ public class GridCacheSyncReplicatedPreloadSelfTest extends GridCommonAbstractTe * @throws Exception If test failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testNodeRestartMultithreaded() throws Exception { final int keyCnt = 1000; final int retries = 50; @@ -157,4 +163,4 @@ public class GridCacheSyncReplicatedPreloadSelfTest extends GridCommonAbstractTe }, threadCnt); } -} \ 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/replicated/GridReplicatedTxPreloadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java index 393cfb9..98d86fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridReplicatedTxPreloadTest.java @@ -20,12 +20,16 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated; import org.apache.ignite.cache.CacheMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxPreloadAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; /** * Tests cache transaction during preloading. */ +@RunWith(JUnit4.class) public class GridReplicatedTxPreloadTest extends IgniteTxPreloadAbstractTest { /** {@inheritDoc} */ @Override protected CacheMode cacheMode() { @@ -38,6 +42,7 @@ public class GridReplicatedTxPreloadTest extends IgniteTxPreloadAbstractTest { } /** {@inheritDoc} */ + @Test @Override public void testLocalTxPreloadingOptimistic() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1755"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java index 8f96639..2caf38f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/IgniteCacheSyncRebalanceModeSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheSyncRebalanceModeSelfTest extends GridCommonAbstractTest { /** Entry count. */ public static final int CNT = 100_000; @@ -60,6 +64,7 @@ public class IgniteCacheSyncRebalanceModeSelfTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testStaticCache() throws Exception { IgniteEx ignite = startGrid(0); @@ -85,6 +90,7 @@ public class IgniteCacheSyncRebalanceModeSelfTest extends GridCommonAbstractTest /** * @throws Exception if failed. */ + @Test public void testDynamicCache() throws Exception { IgniteEx ignite = 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/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java index dee3b5e..f178e24 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadLifecycleSelfTest.java @@ -28,6 +28,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.lifecycle.LifecycleEventType; import org.apache.ignite.resources.IgniteInstanceResource; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -38,6 +41,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED /** * Tests for replicated cache preloader. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloadLifecycleAbstractTest { /** */ private static boolean quiet = true; @@ -159,6 +163,7 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa /** * @throws Exception If failed. */ + @Test public void testLifecycleBean1() throws Exception { checkCache(keys(true, DFLT_KEYS.length, DFLT_KEYS)); } @@ -166,6 +171,7 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa /** * @throws Exception If failed. */ + @Test public void testLifecycleBean2() throws Exception { checkCache(keys(false, DFLT_KEYS.length, DFLT_KEYS)); } @@ -173,6 +179,7 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa /** * @throws Exception If failed. */ + @Test public void testLifecycleBean3() throws Exception { checkCache(keys(true, 500)); } @@ -180,6 +187,7 @@ public class GridCacheReplicatedPreloadLifecycleSelfTest extends GridCachePreloa /** * @throws Exception If failed. */ + @Test public void testLifecycleBean4() throws Exception { checkCache(keys(false, 500)); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java index 8101172..3b14923 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadSelfTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi; 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 org.apache.ignite.cache.CacheMode.REPLICATED; import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC; @@ -73,6 +76,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_STOPPED; * Tests for replicated cache preloader. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** */ private CacheRebalanceMode preloadMode = ASYNC; @@ -214,6 +218,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleNode() throws Exception { preloadMode = SYNC; @@ -228,6 +233,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testIntegrity() throws Exception { preloadMode = SYNC; @@ -303,6 +309,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testDeployment() throws Exception { // TODO GG-11141. if (true) @@ -381,6 +388,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtConfiguration() throws Exception { try { extClassloadingAtCfg = true; @@ -436,6 +444,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtConfigurationDynamicStart() throws Exception { try { extClassloadingAtCfg = false; @@ -474,6 +483,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtConfigurationDynamicStart2() throws Exception { try { extClassloadingAtCfg = false; @@ -512,6 +522,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtMessage() throws Exception { try { useExtClassLoader = true; @@ -564,6 +575,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtEventP2pDisabled() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -573,6 +585,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testExternalClassesAtEvent() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -622,6 +635,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testSync() throws Exception { preloadMode = SYNC; batchSize = 512; @@ -646,6 +660,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testAsync() throws Exception { preloadMode = ASYNC; batchSize = 256; @@ -680,6 +695,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testBatchSize1() throws Exception { preloadMode = SYNC; batchSize = 1; // 1 byte but one entry should be in batch anyway. @@ -704,6 +720,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testBatchSize1000() throws Exception { preloadMode = SYNC; batchSize = 1000; // 1000 bytes. @@ -728,6 +745,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testBatchSize10000() throws Exception { preloadMode = SYNC; batchSize = 10000; // 10000 bytes. @@ -753,6 +771,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testMultipleNodes() throws Exception { preloadMode = ASYNC; batchSize = 256; @@ -822,6 +841,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testConcurrentStartSync() throws Exception { preloadMode = SYNC; batchSize = 10000; @@ -837,6 +857,7 @@ public class GridCacheReplicatedPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testConcurrentStartAsync() throws Exception { preloadMode = ASYNC; batchSize = 10000; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java index 07c50d3..632f0ff4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadStartStopEventsSelfTest.java @@ -27,6 +27,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.REPLICATED; import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_STARTED; @@ -35,6 +38,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_STOPPED; /** * Tests that preload start/preload stop events are fired only once for replicated cache. */ +@RunWith(JUnit4.class) public class GridCacheReplicatedPreloadStartStopEventsSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -64,6 +68,7 @@ public class GridCacheReplicatedPreloadStartStopEventsSelfTest extends GridCommo /** * @throws Exception If failed. */ + @Test public void testStartStopEvents() throws Exception { Ignite ignite = startGrid(0); @@ -92,4 +97,4 @@ public class GridCacheReplicatedPreloadStartStopEventsSelfTest extends GridCommo assertTrue("Unexpected start count: " + preloadStartCnt.get(), preloadStartCnt.get() <= 1); assertTrue("Unexpected stop count: " + preloadStopCnt.get(), preloadStopCnt.get() <= 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/eviction/DhtAndNearEvictionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java index 83771ba..aaab659 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/DhtAndNearEvictionTest.java @@ -38,12 +38,16 @@ import org.apache.ignite.testframework.GridStringLogger; 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; /** * Checking that DHT and near cache evictions work correctly when both are set. * * This is a regression test for IGNITE-9315. */ +@RunWith(JUnit4.class) public class DhtAndNearEvictionTest extends GridCommonAbstractTest { /** */ public GridStringLogger strLog; @@ -93,6 +97,7 @@ public class DhtAndNearEvictionTest extends GridCommonAbstractTest { * <li>backups=1</li> * </ul> */ + @Test public void testConcurrentWritesAndReadsWithReadThrough() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -148,6 +153,7 @@ public class DhtAndNearEvictionTest extends GridCommonAbstractTest { /** * Checking rebalancing which used to be affected by IGNITE-9315. */ + @Test public void testRebalancing() throws Exception { Ignite grid0 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java index fa27cc8..a2ec388 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java @@ -44,6 +44,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.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.LOCAL; @@ -61,6 +64,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Base class for eviction tests. */ +@RunWith(JUnit4.class) public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> extends GridCommonAbstractTest { /** IP finder. */ @@ -147,6 +151,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizePolicy() throws Exception { plcMax = 3; plcMaxMemSize = 0; @@ -158,6 +163,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizePolicyWithBatch() throws Exception { plcMax = 3; plcMaxMemSize = 0; @@ -169,6 +175,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxMemSizePolicy() throws Exception { plcMax = 0; plcMaxMemSize = 3 * MockEntry.ENTRY_SIZE; @@ -182,6 +189,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> * * @throws Exception If failed. */ + @Test public void testMaxMemSizePolicyWithBatch() throws Exception { plcMax = 3; plcMaxMemSize = 10 * MockEntry.ENTRY_SIZE; @@ -193,6 +201,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizeMemory() throws Exception { int max = 10; @@ -206,6 +215,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizeMemoryWithBatch() throws Exception { int max = 10; @@ -219,6 +229,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeMemory() throws Exception { int max = 10; @@ -232,6 +243,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizeRandom() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -243,6 +255,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizeRandomWithBatch() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -254,6 +267,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeRandom() throws Exception { plcMax = 0; plcMaxMemSize = 10 * MockEntry.KEY_SIZE; @@ -265,6 +279,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizeAllowEmptyEntries() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -276,6 +291,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizeAllowEmptyEntriesWithBatch() throws Exception { plcMax = 10; plcMaxMemSize = 0; @@ -287,6 +303,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxMemSizeAllowEmptyEntries() throws Exception { plcMax = 0; plcMaxMemSize = 10 * MockEntry.KEY_SIZE; @@ -298,6 +315,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizePut() throws Exception { plcMax = 100; plcBatchSize = 1; @@ -309,6 +327,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxSizePutWithBatch() throws Exception { plcMax = 100; plcBatchSize = 2; @@ -320,6 +339,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> /** * @throws Exception If failed. */ + @Test public void testMaxMemSizePut() throws Exception { int max = 100; @@ -653,6 +673,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -665,6 +686,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } /** @throws Exception If failed. */ + @Test public void testMaxSizePartitionedNearDisabledWithBatch() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -678,6 +700,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } /** @throws Exception If failed. */ + @Test public void testMaxMemSizePartitionedNearDisabled() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -691,6 +714,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabled() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -704,6 +728,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } /** @throws Exception If failed. */ + @Test public void testPartitionedNearDisabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -715,6 +740,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } /** @throws Exception If failed. */ + @Test public void testPartitionedNearEnabledMultiThreaded() throws Exception { mode = PARTITIONED; nearEnabled = true; @@ -1027,4 +1053,4 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>> } } } -} \ No newline at end of file +}