http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java index e1e5315..1f5bc28 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtMultiBackupTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.resources.IgniteInstanceResource; 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 GridCacheDhtMultiBackupTest extends GridCommonAbstractTest { /** * @@ -41,6 +45,7 @@ public class GridCacheDhtMultiBackupTest extends GridCommonAbstractTest { /** * @throws Exception If failed */ + @Test public void testPut() throws Exception { try { Ignite g = G.start("examples/config/example-cache.xml");
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java index 86dbd4f..ecd2909 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java @@ -31,6 +31,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.CacheRebalanceMode.ASYNC; @@ -42,6 +45,7 @@ import static org.apache.ignite.configuration.DeploymentMode.CONTINUOUS; /** * Test large cache counts. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest { /** Size of values in KB. */ private static final int KBSIZE = 10 * 1024; @@ -125,6 +129,7 @@ public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLargeObjects() throws Exception { preloadMode = SYNC; @@ -159,6 +164,7 @@ public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLargeObjectsWithLifeCycleBean() throws Exception { preloadMode = SYNC; partitions = 23; @@ -230,4 +236,4 @@ public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest { @Override protected long getTestTimeout() { return 6 * 60 * 1000; // 6 min. } -} \ 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/dht/GridCacheDhtPreloadDelayedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java index 9941d58..adf3052 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java @@ -50,6 +50,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 java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -60,6 +63,7 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 100; @@ -110,6 +114,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testManualPreload() throws Exception { delay = -1; @@ -189,6 +194,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDelayedPreload() throws Exception { delay = PRELOAD_DELAY; @@ -260,6 +266,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAutomaticPreload() throws Exception { delay = 0; preloadMode = CacheRebalanceMode.SYNC; @@ -293,6 +300,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAutomaticPreloadWithEmptyCache() throws Exception { preloadMode = SYNC; @@ -343,6 +351,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testManualPreloadSyncMode() throws Exception { preloadMode = CacheRebalanceMode.SYNC; delay = -1; @@ -358,6 +367,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPreloadManyNodes() throws Exception { delay = 0; preloadMode = ASYNC; @@ -479,4 +489,4 @@ public class GridCacheDhtPreloadDelayedSelfTest 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/dht/GridCacheDhtPreloadDisabledSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java index 8899654..17bd88d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java @@ -42,6 +42,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; @@ -52,6 +55,7 @@ import static org.apache.ignite.events.EventType.EVTS_CACHE_REBALANCE; /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest { /** Flat to print preloading events. */ private static final boolean DEBUG = false; @@ -74,13 +78,6 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest /** IP finder. */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); - /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { - MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); - - super.beforeTestsStarted(); - } - /** * */ @@ -115,6 +112,8 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { + MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); + backups = DFLT_BACKUPS; partitions = DFLT_PARTITIONS; } @@ -133,6 +132,7 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testSamePartitionMap() throws Exception { backups = 1; partitions = 10; @@ -182,6 +182,7 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testDisabledPreloader() throws Exception { try { Ignite ignite1 = 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/dht/GridCacheDhtPreloadMessageCountTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java index 886a886..8afd359 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java @@ -32,6 +32,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; @@ -39,6 +42,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 1000; @@ -87,6 +91,7 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testAutomaticPreload() throws Exception { Ignite g0 = startGrid(0); @@ -134,4 +139,4 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest assertEquals(Integer.valueOf(i), c.localPeek(key, CachePeekMode.ONHEAP)); } } -} \ 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/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java index 5f7be7a..d301dc8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java @@ -36,10 +36,14 @@ 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.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * MultiThreaded load test for DHT preloader. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -54,6 +58,7 @@ public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testNodeLeaveBeforePreloadingComplete() throws Exception { try { final CountDownLatch startLatch = new CountDownLatch(1); @@ -111,6 +116,7 @@ public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testConcurrentNodesStart() throws Exception { try { multithreadedAsync( @@ -137,6 +143,7 @@ public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testConcurrentNodesStartStop() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -184,4 +191,4 @@ public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstract return cfg; } -} \ 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/dht/GridCacheDhtPreloadPerformanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java index 4b08a09..989b30d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPerformanceTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import java.util.concurrent.Callable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadPerformanceTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 30; @@ -101,6 +105,7 @@ public class GridCacheDhtPreloadPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartPerformance() throws Exception { // // for (int i = 0; i < 10; i++) { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java index a62984a..73aaac4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadPutGetSelfTest.java @@ -36,6 +36,9 @@ 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.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.CacheRebalanceMode.ASYNC; @@ -46,6 +49,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** Key count. */ private static final int KEY_CNT = 1000; @@ -93,6 +97,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetAsync0() throws Exception { preloadMode = ASYNC; backups = 0; @@ -103,6 +108,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetAsync1() throws Exception { preloadMode = ASYNC; backups = 1; @@ -113,6 +119,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetAsync2() throws Exception { preloadMode = ASYNC; backups = 2; @@ -123,6 +130,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetSync0() throws Exception { preloadMode = SYNC; backups = 0; @@ -133,6 +141,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetSync1() throws Exception { preloadMode = SYNC; backups = 1; @@ -143,6 +152,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetSync2() throws Exception { preloadMode = SYNC; backups = 2; @@ -153,6 +163,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetNone0() throws Exception { preloadMode = NONE; backups = 0; @@ -163,6 +174,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetNone1() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -176,6 +188,7 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetNone2() throws Exception { if (MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-10261"); @@ -280,4 +293,4 @@ public class GridCacheDhtPreloadPutGetSelfTest extends GridCommonAbstractTest { 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/dht/GridCacheDhtPreloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java index 76b1424..91e0555 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java @@ -47,6 +47,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.CacheRebalanceMode.ASYNC; @@ -62,6 +65,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.topolo /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** Flag to print preloading events. */ private static final boolean DEBUG = false; @@ -158,6 +162,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferSyncSameCoordinator() throws Exception { preloadMode = SYNC; @@ -167,6 +172,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferAsyncSameCoordinator() throws Exception { checkActivePartitionTransfer(1000, 4, true, false); } @@ -174,6 +180,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferSyncChangingCoordinator() throws Exception { preloadMode = SYNC; @@ -183,6 +190,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferAsyncChangingCoordinator() throws Exception { checkActivePartitionTransfer(1000, 4, false, false); } @@ -190,6 +198,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferSyncRandomCoordinator() throws Exception { preloadMode = SYNC; @@ -199,6 +208,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testActivePartitionTransferAsyncRandomCoordinator() throws Exception { checkActivePartitionTransfer(1000, 4, false, true); } @@ -349,6 +359,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultiplePartitionBatchesSyncPreload() throws Exception { preloadMode = SYNC; preloadBatchSize = 100; @@ -360,6 +371,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultiplePartitionBatchesAsyncPreload() throws Exception { preloadBatchSize = 100; partitions = 2; @@ -370,6 +382,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesSyncPreloadSameCoordinator() throws Exception { preloadMode = SYNC; @@ -379,6 +392,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesAsyncPreloadSameCoordinator() throws Exception { checkNodes(1000, 4, true, false); } @@ -386,6 +400,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesSyncPreloadChangingCoordinator() throws Exception { preloadMode = SYNC; @@ -395,6 +410,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesAsyncPreloadChangingCoordinator() throws Exception { checkNodes(1000, 4, false, false); } @@ -402,6 +418,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesSyncPreloadRandomCoordinator() throws Exception { preloadMode = SYNC; @@ -411,6 +428,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleNodesAsyncPreloadRandomCoordinator() throws Exception { checkNodes(1000, 4, false, true); } @@ -624,4 +642,4 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest { return "Grid partition maps [" + map.toString() + ']'; } -} \ 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/dht/GridCacheDhtPreloadStartStopSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java index e77e5c8..b142b90 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java @@ -38,6 +38,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; @@ -50,6 +53,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.topolo /** * Test cases for partitioned cache {@link GridDhtPreloader preloader}. */ +@RunWith(JUnit4.class) public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest { /** */ private static final long TEST_TIMEOUT = 5 * 60 * 1000; @@ -164,6 +168,7 @@ public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest } /** @throws Exception If failed. */ + @Test public void testDeadlock() throws Exception { info("Testing deadlock..."); @@ -263,4 +268,4 @@ public class GridCacheDhtPreloadStartStopSelfTest 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/dht/GridCacheDhtPreloadUnloadSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java index bc5e3d4..43d8201 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java @@ -32,6 +32,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.configuration.DeploymentMode.CONTINUOUS; * Test large cache counts. */ @SuppressWarnings({"BusyWait"}) +@RunWith(JUnit4.class) public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { /** Default backups. */ private static final int DFLT_BACKUPS = 1; @@ -121,6 +125,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testUnloadZeroBackupsTwoNodes() throws Exception { preloadMode = SYNC; backups = 0; @@ -148,6 +153,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testUnloadOneBackupTwoNodes() throws Exception { preloadMode = SYNC; backups = 1; @@ -226,6 +232,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testUnloadOneBackupThreeNodes() throws Exception { preloadMode = SYNC; backups = 1; @@ -258,6 +265,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testUnloadOneBackThreeNodesWithLifeCycleBean() throws Exception { preloadMode = SYNC; backups = 1; @@ -324,4 +332,4 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest { return b.toString(); } -} \ 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/dht/GridCacheGlobalLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java index 63b2449..ea9360d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.MvccFeatureChecker; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +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,6 +46,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; * Load cache test. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { /** */ private static ConcurrentMap<String, Object[]> map; @@ -80,6 +84,7 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCache() throws Exception { loadCache(false, false); } @@ -87,6 +92,7 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsyncOld() throws Exception { loadCache(true, true); } @@ -94,6 +100,7 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoadCacheAsync() throws Exception { loadCache(true, false); } @@ -250,4 +257,4 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest { fail(); } } -} \ 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/dht/GridCachePartitionedNearDisabledLockSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java index 102185c..ff738c6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java @@ -19,10 +19,14 @@ package org.apache.ignite.internal.processors.cache.distributed.dht; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedLockSelfTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionedNearDisabledLockSelfTest extends GridCachePartitionedLockSelfTest { /** {@inheritDoc} */ @Override protected CacheConfiguration cacheConfiguration() { @@ -41,7 +45,8 @@ public class GridCachePartitionedNearDisabledLockSelfTest extends GridCacheParti } /** {@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/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java index 6c2da72..2abfe79 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.cache.CacheMetrics; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest; +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.CacheRebalanceMode.SYNC; @@ -31,6 +34,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Metrics test for partitioned cache with disabled near cache. */ +@RunWith(JUnit4.class) public class GridCachePartitionedNearDisabledMetricsSelfTest extends GridCacheAbstractSelfTest { /** */ private static final int GRID_CNT = 2; @@ -77,6 +81,7 @@ public class GridCachePartitionedNearDisabledMetricsSelfTest extends GridCacheAb /** * @throws Exception If failed. */ + @Test public void testGettingRemovedKey() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-819"); @@ -120,4 +125,4 @@ public class GridCachePartitionedNearDisabledMetricsSelfTest extends GridCacheAb assertEquals(0, hits); assertEquals(1, misses); } -} \ 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/dht/GridCachePartitionedTopologyChangeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java index 2051616..389876f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; import static org.apache.ignite.cache.CacheRebalanceMode.SYNC; @@ -58,6 +61,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Tests that new transactions do not start until partition exchange is completed. */ +@RunWith(JUnit4.class) public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstractTest { /** Partition does not belong to node. */ private static final int PARTITION_READER = 0; @@ -103,6 +107,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testNearTxNodeJoined() throws Exception { checkTxNodeJoined(PARTITION_READER); } @@ -110,6 +115,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testPrimaryTxNodeJoined() throws Exception { checkTxNodeJoined(PARTITION_PRIMARY); } @@ -117,6 +123,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testBackupTxNodeJoined() throws Exception { checkTxNodeJoined(PARTITION_BACKUP); } @@ -124,6 +131,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testNearTxNodeLeft() throws Exception { checkTxNodeLeft(PARTITION_READER); } @@ -131,6 +139,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testPrimaryTxNodeLeft() throws Exception { // This test does not make sense because if node is primary for some partition, // it will reside on node until node leaves grid. @@ -139,6 +148,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testBackupTxNodeLeft() throws Exception { checkTxNodeLeft(PARTITION_BACKUP); } @@ -146,6 +156,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra /** * @throws Exception If failed. */ + @Test public void testExplicitLocks() throws Exception { try { startGridsMultiThreaded(2); @@ -617,4 +628,4 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra return res; } -} \ 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/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java index 81d4796..66f25bd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTxOriginatingNodeFailureSelfTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.processors.cache.distributed.IgniteTxOriginatingNodeFailureAbstractSelfTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareRequest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests transaction consistency when originating node fails. */ +@RunWith(JUnit4.class) public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends IgniteTxOriginatingNodeFailureAbstractSelfTest { /** */ @@ -58,6 +62,7 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends /** * @throws Exception If failed. */ + @Test public void testTxFromPrimary() throws Exception { ClusterNode txNode = grid(originatingNode()).localNode(); @@ -79,6 +84,7 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends /** * @throws Exception If failed. */ + @Test public void testTxFromBackup() throws Exception { ClusterNode txNode = grid(originatingNode()).localNode(); @@ -100,6 +106,7 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends /** * @throws Exception If failed. */ + @Test public void testTxFromNotColocated() throws Exception { ClusterNode txNode = grid(originatingNode()).localNode(); @@ -122,6 +129,7 @@ public class GridCachePartitionedTxOriginatingNodeFailureSelfTest extends /** * @throws Exception If failed. */ + @Test public void testTxAllNodes() throws Exception { List<ClusterNode> allNodes = new ArrayList<>(GRID_CNT); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java index d00dd7a..04c835a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java @@ -36,6 +36,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.CacheRebalanceMode.SYNC; @@ -44,6 +47,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_PART_UNLOAD /** */ +@RunWith(JUnit4.class) public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstractTest { /** */ private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -89,6 +93,7 @@ public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstract /** * @throws Exception if failed. */ + @Test public void testUnloadEvents() throws Exception { final Ignite g1 = startGrid("g1"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java index fcc1293..59fb133 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidationTest.java @@ -55,10 +55,14 @@ 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; /** * */ +@RunWith(JUnit4.class) public class GridCachePartitionsStateValidationTest extends GridCommonAbstractTest { /** Cache name. */ private static final String CACHE_NAME = "cache"; @@ -102,6 +106,7 @@ public class GridCachePartitionsStateValidationTest extends GridCommonAbstractTe * * @throws Exception If failed. */ + @Test public void testValidationIfPartitionCountersAreInconsistent() throws Exception { IgniteEx ignite = (IgniteEx) startGrids(2); ignite.cluster().active(true); @@ -134,6 +139,7 @@ public class GridCachePartitionsStateValidationTest extends GridCommonAbstractTe * * @throws Exception If failed. */ + @Test public void testPartitionCountersConsistencyOnExchange() throws Exception { IgniteEx ignite = (IgniteEx) startGrids(4); 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/dht/GridCachePartitionsStateValidatorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java index 9cf296a..9d21162 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionsStateValidatorSelfTest.java @@ -33,12 +33,16 @@ import org.apache.ignite.internal.util.typedef.T2; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.mockito.Matchers; import org.mockito.Mockito; /** * Test correct behaviour of {@link GridDhtPartitionsStateValidator} class. */ +@RunWith(JUnit4.class) public class GridCachePartitionsStateValidatorSelfTest extends GridCommonAbstractTest { /** Mocks and stubs. */ private final UUID localNodeId = UUID.randomUUID(); @@ -100,6 +104,7 @@ public class GridCachePartitionsStateValidatorSelfTest extends GridCommonAbstrac /** * Test partition update counters validation. */ + @Test public void testPartitionCountersValidation() { UUID remoteNode = UUID.randomUUID(); UUID ignoreNode = UUID.randomUUID(); @@ -139,6 +144,7 @@ public class GridCachePartitionsStateValidatorSelfTest extends GridCommonAbstrac /** * Test partition cache sizes validation. */ + @Test public void testPartitionCacheSizesValidation() { UUID remoteNode = UUID.randomUUID(); UUID ignoreNode = UUID.randomUUID(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java index 1c9f97d..72fdd13 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheTxNodeFailureSelfTest.java @@ -48,6 +48,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.TransactionRollbackException; +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; @@ -60,6 +63,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA * Tests one-phase commit transactions when some of the nodes fail in the middle of the transaction. */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -106,6 +110,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupCommitPessimistic() throws Exception { checkPrimaryNodeFailureBackupCommit(PESSIMISTIC, false, true); } @@ -113,6 +118,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupCommitOptimistic() throws Exception { checkPrimaryNodeFailureBackupCommit(OPTIMISTIC, false, true); } @@ -120,6 +126,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupCommitPessimisticOnBackup() throws Exception { checkPrimaryNodeFailureBackupCommit(PESSIMISTIC, true, true); } @@ -127,6 +134,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupCommitOptimisticOnBackup() throws Exception { checkPrimaryNodeFailureBackupCommit(OPTIMISTIC, true, true); } @@ -134,6 +142,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupRollbackPessimistic() throws Exception { checkPrimaryNodeFailureBackupCommit(PESSIMISTIC, false, false); } @@ -141,6 +150,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupRollbackOptimistic() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1731"); @@ -150,6 +160,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupRollbackPessimisticOnBackup() throws Exception { checkPrimaryNodeFailureBackupCommit(PESSIMISTIC, true, false); } @@ -157,6 +168,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupRollbackOptimisticOnBackup() throws Exception { checkPrimaryNodeFailureBackupCommit(OPTIMISTIC, true, false); } @@ -164,6 +176,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupCommitImplicit() throws Exception { checkPrimaryNodeFailureBackupCommit(null, false, true); } @@ -171,6 +184,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupCommitImplicitOnBackup() throws Exception { checkPrimaryNodeFailureBackupCommit(null, true, true); } @@ -178,6 +192,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupRollbackImplicit() throws Exception { checkPrimaryNodeFailureBackupCommit(null, false, false); } @@ -185,6 +200,7 @@ public class GridCacheTxNodeFailureSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPrimaryNodeFailureBackupRollbackImplicitOnBackup() throws Exception { checkPrimaryNodeFailureBackupCommit(null, true, false); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java index 2c6d187..60b240f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteAtomicLongChangingTopologySelfTest.java @@ -46,6 +46,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.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; @@ -54,6 +57,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRID_CNT = 5; @@ -108,6 +112,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testQueueCreateNodesJoin() throws Exception { CountDownLatch startLatch = new CountDownLatch(GRID_CNT); final AtomicBoolean run = new AtomicBoolean(true); @@ -136,6 +141,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testClientAtomicLongCreateCloseFailover() throws Exception { testFailoverWithClient(new IgniteInClosure<Ignite>() { @Override public void apply(Ignite ignite) { @@ -151,6 +157,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testClientQueueCreateCloseFailover() throws Exception { testFailoverWithClient(new IgniteInClosure<Ignite>() { @Override public void apply(Ignite ignite) { @@ -172,6 +179,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testClientSetCreateCloseFailover() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-9015"); @@ -181,6 +189,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testClientCollocatedSetCreateCloseFailover() throws Exception { checkClientSetCreateCloseFailover(true); } @@ -284,6 +293,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testIncrementConsistency() throws Exception { startGrids(GRID_CNT); @@ -323,6 +333,7 @@ public class IgniteAtomicLongChangingTopologySelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testQueueClose() throws Exception { startGrids(GRID_CNT); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java index 5194020..d0af7dd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheClearDuringRebalanceTest.java @@ -30,12 +30,16 @@ 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 org.apache.ignite.cache.CacheMode.PARTITIONED; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheClearDuringRebalanceTest extends GridCommonAbstractTest { /** */ private static final String CACHE_NAME = "cache"; @@ -44,11 +48,9 @@ public class IgniteCacheClearDuringRebalanceTest extends GridCommonAbstractTest private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); /** {@inheritDoc} */ - @Override protected void beforeTestsStarted() throws Exception { + @Override protected void beforeTest() throws Exception { if(MvccFeatureChecker.forcedMvcc()) fail("https://issues.apache.org/jira/browse/IGNITE-7952"); - - super.beforeTestsStarted(); } /** {@inheritDoc} */ @@ -77,6 +79,7 @@ public class IgniteCacheClearDuringRebalanceTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClearAll() throws Exception { final IgniteEx node = 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/dht/IgniteCacheCommitDelayTxRecoveryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java index 7b8854d..43912f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCommitDelayTxRecoveryTest.java @@ -44,6 +44,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 java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -55,6 +58,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -97,6 +101,7 @@ public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testRecovery1() throws Exception { checkRecovery(1, false); } @@ -104,6 +109,7 @@ public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testRecovery2() throws Exception { checkRecovery(2, false); } @@ -111,6 +117,7 @@ public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testRecoveryStoreEnabled1() throws Exception { checkRecovery(1, true); } @@ -118,6 +125,7 @@ public class IgniteCacheCommitDelayTxRecoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testRecoveryStoreEnabled2() throws Exception { checkRecovery(2, true); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java index a83e999..d061169 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java @@ -33,6 +33,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 IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -67,6 +71,7 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetRemoveAtomic() throws Exception { putGetRemove(cacheConfiguration(ATOMIC, 1)); } @@ -74,6 +79,7 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPutGetRemoveTx() throws Exception { putGetRemove(cacheConfiguration(TRANSACTIONAL, 1)); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java index 40f9dc4..c61d257 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java @@ -49,6 +49,9 @@ import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -63,6 +66,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE; /** * */ +@RunWith(JUnit4.class) public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -135,6 +139,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailover() throws Exception { crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ); } @@ -142,6 +147,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailoverDifferentAffinity() throws Exception { crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ); } @@ -149,6 +155,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticTxFailover() throws Exception { crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ); } @@ -156,6 +163,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticSerializableTxFailover() throws Exception { crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, SERIALIZABLE); } @@ -163,6 +171,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticTxFailoverDifferentAffinity() throws Exception { crossCacheTxFailover(PARTITIONED, false, OPTIMISTIC, REPEATABLE_READ); } @@ -170,6 +179,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailoverReplicated() throws Exception { crossCacheTxFailover(REPLICATED, true, PESSIMISTIC, REPEATABLE_READ); } @@ -177,6 +187,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCacheOptimisticTxFailoverReplicated() throws Exception { crossCacheTxFailover(REPLICATED, true, OPTIMISTIC, REPEATABLE_READ); } @@ -184,6 +195,7 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCrossCachePessimisticTxFailoverDifferentAffinityReplicated() throws Exception { crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java index ac6ba5e..70b65b1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheLockFailoverSelfTest.java @@ -31,14 +31,20 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteFutureTimeoutException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.apache.ignite.testframework.MvccFeatureChecker; /** * */ @SuppressWarnings("unchecked") +@RunWith(JUnit4.class) public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -93,6 +99,7 @@ public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testLockFailover() throws Exception { IgniteCache<Integer, Integer> cache = grid(0).cache(DEFAULT_CACHE_NAME); @@ -157,6 +164,7 @@ public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testUnlockPrimaryLeft() throws Exception { GridCacheAdapter<Integer, Integer> cache = ((IgniteKernal)grid(0)).internalCache(DEFAULT_CACHE_NAME); @@ -174,4 +182,4 @@ public class IgniteCacheLockFailoverSelfTest extends GridCacheAbstractSelfTest { startGrid(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/dht/IgniteCacheMultiTxLockSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java index d7454fd..50b8db7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java @@ -36,6 +36,10 @@ 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.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.CacheMode.PARTITIONED; @@ -44,6 +48,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC /** * Tests explicit lock. */ +@RunWith(JUnit4.class) public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { /** */ public static final String CACHE_NAME = "part_cache"; @@ -61,6 +66,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { private volatile Throwable err; /** {@inheritDoc} */ + @Before @Override public void setUp() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.ENTRY_LOCK); @@ -106,6 +112,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExplicitLockOneKey() throws Exception { checkExplicitLock(1, false); } @@ -113,6 +120,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExplicitLockManyKeys() throws Exception { checkExplicitLock(4, false); } @@ -120,6 +128,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testExplicitLockManyKeysWithClient() throws Exception { checkExplicitLock(4, true); } @@ -272,4 +281,4 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest { return res; } -} \ 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/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java index 6cecce1..6863601 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePartitionedBackupNodeFailureRecoveryTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.internal.processors.cache.IgniteCacheAbstractTest; import org.apache.ignite.internal.util.typedef.PA; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC; import static org.apache.ignite.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; /** */ +@RunWith(JUnit4.class) public class IgniteCachePartitionedBackupNodeFailureRecoveryTest extends IgniteCacheAbstractTest { /** {@inheritDoc}*/ @Override protected int gridCount() { @@ -80,6 +84,7 @@ public class IgniteCachePartitionedBackupNodeFailureRecoveryTest extends IgniteC * * @throws Exception If failed. */ + @Test public void testBackUpFail() throws Exception { final IgniteEx node1 = grid(0); final IgniteEx node2 = grid(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java index b0d083d..48755e8 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePrimaryNodeFailureRecoveryAbstractTest.java @@ -59,6 +59,9 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi; 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.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; @@ -72,6 +75,7 @@ import static org.apache.ignite.transactions.TransactionState.PREPARED; /** * */ +@RunWith(JUnit4.class) public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends IgniteCacheAbstractTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -120,6 +124,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRecovery1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -129,6 +134,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRecovery2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -138,6 +144,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRollback1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -147,6 +154,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryNodeFailureRollback2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -156,6 +164,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRecovery1() throws Exception { primaryNodeFailure(false, false, false); } @@ -163,6 +172,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRecovery2() throws Exception { primaryNodeFailure(true, false, false); } @@ -170,6 +180,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRollback1() throws Exception { primaryNodeFailure(false, true, false); } @@ -177,6 +188,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryNodeFailureRollback2() throws Exception { primaryNodeFailure(true, true, false); } @@ -281,6 +293,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRecovery1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -290,6 +303,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRecovery2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -299,6 +313,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRollback1() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -308,6 +323,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testOptimisticPrimaryAndOriginatingNodeFailureRollback2() throws Exception { if (atomicityMode() == TRANSACTIONAL_SNAPSHOT) return; @@ -317,6 +333,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRecovery1() throws Exception { primaryAndOriginatingNodeFailure(false, false, false); } @@ -324,6 +341,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRecovery2() throws Exception { primaryAndOriginatingNodeFailure(true, false, false); } @@ -331,6 +349,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRollback1() throws Exception { primaryAndOriginatingNodeFailure(false, true, false); } @@ -338,6 +357,7 @@ public abstract class IgniteCachePrimaryNodeFailureRecoveryAbstractTest extends /** * @throws Exception If failed. */ + @Test public void testPessimisticPrimaryAndOriginatingNodeFailureRollback2() throws Exception { primaryAndOriginatingNodeFailure(true, true, false); }
