http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java index 5910a35..5872c31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/SwapPathConstructionSelfTest.java @@ -31,11 +31,15 @@ import org.apache.ignite.internal.processors.cache.persistence.IgniteCacheDataba import org.apache.ignite.internal.processors.cache.persistence.DataRegion; 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; /** * Test verifies correct construction of swap file path {@link DataRegionConfiguration#setSwapPath(String)} * when absolute or relative paths are provided via configuration. */ +@RunWith(JUnit4.class) public class SwapPathConstructionSelfTest extends GridCommonAbstractTest { /** */ private DataStorageConfiguration memCfg; @@ -78,6 +82,7 @@ public class SwapPathConstructionSelfTest extends GridCommonAbstractTest { /** * Verifies relative swap file path construction. Directory with swap files is cleaned up during after-test phase. */ + @Test public void testRelativeSwapFilePath() throws Exception { memCfg = createMemoryConfiguration(true); @@ -94,6 +99,7 @@ public class SwapPathConstructionSelfTest extends GridCommonAbstractTest { * Verifies absolute swap file path construction. System tmp directory is used to allocate swap files, * so no clean up is needed. */ + @Test public void testAbsoluteSwapFilePath() throws Exception { memCfg = createMemoryConfiguration(false);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java index 03c9d19..6219bfd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorMvccSelfTest.java @@ -20,12 +20,16 @@ package org.apache.ignite.internal.processors.datastreamer; import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL_SNAPSHOT; /** * Check DataStreamer with Mvcc enabled. */ +@RunWith(JUnit4.class) public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest { /** {@inheritDoc} */ @SuppressWarnings("unchecked") @@ -51,6 +55,7 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest } /** {@inheritDoc} */ + @Test @Override public void testUpdateStore() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8582"); @@ -58,11 +63,13 @@ public class DataStreamProcessorMvccSelfTest extends DataStreamProcessorSelfTest } /** {@inheritDoc} */ + @Test @Override public void testFlushTimeout() { fail("https://issues.apache.org/jira/browse/IGNITE-9321"); } /** {@inheritDoc} */ + @Test @Override public void testLocal() { fail("https://issues.apache.org/jira/browse/IGNITE-9530"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java index c6ecf48..6c02a3c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java @@ -70,6 +70,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 java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -82,6 +85,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * */ +@RunWith(JUnit4.class) public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** */ private static ConcurrentHashMap<Object, Object> storeMap; @@ -191,6 +195,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitioned() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.NEAR_CACHE); @@ -202,6 +207,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testColocated() throws Exception { mode = PARTITIONED; nearEnabled = false; @@ -212,6 +218,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReplicated() throws Exception { mode = REPLICATED; @@ -221,6 +228,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocal() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.LOCAL_CACHE); @@ -340,6 +348,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionedIsolated() throws Exception { mode = PARTITIONED; @@ -349,6 +358,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReplicatedIsolated() throws Exception { mode = REPLICATED; @@ -441,6 +451,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testPrimitiveArrays() throws Exception { try { useCache = true; @@ -474,6 +485,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReplicatedMultiThreaded() throws Exception { mode = REPLICATED; @@ -483,6 +495,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartitionedMultiThreaded() throws Exception { mode = PARTITIONED; @@ -609,6 +622,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLoaderApi() throws Exception { useCache = true; @@ -765,6 +779,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFlush() throws Exception { mode = PARTITIONED; @@ -819,6 +834,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTryFlush() throws Exception { mode = PARTITIONED; @@ -856,6 +872,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFlushTimeout() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); @@ -911,6 +928,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateStore() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_STORE); @@ -982,6 +1000,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCustomUserUpdater() throws Exception { useCache = true; @@ -1017,6 +1036,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalDataStreamerDedicatedThreadPool() throws Exception { try { useCache = true; @@ -1061,6 +1081,7 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemoteDataStreamerDedicatedThreadPool() throws Exception { try { useCache = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java index 239647c..5dd5491 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerClientReconnectAfterClusterRestartTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests DataStreamer reconnect behaviour when client nodes arrives at the same or different topVer than it left. */ +@RunWith(JUnit4.class) public class DataStreamerClientReconnectAfterClusterRestartTest extends GridCommonAbstractTest { /** */ public static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -53,21 +57,25 @@ public class DataStreamerClientReconnectAfterClusterRestartTest extends GridComm } /** */ + @Test public void testOneClient() throws Exception { clusterRestart(false, false); } /** */ + @Test public void testOneClientAllowOverwrite() throws Exception { clusterRestart(false, true); } /** */ + @Test public void testTwoClients() throws Exception { clusterRestart(true, false); } /** */ + @Test public void testTwoClientsAllowOverwrite() throws Exception { clusterRestart(true, true); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java index e4c7660..5439d68 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImplSelfTest.java @@ -59,6 +59,9 @@ import org.apache.log4j.Appender; import org.apache.log4j.Logger; import org.apache.log4j.SimpleLayout; import org.apache.log4j.WriterAppender; +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; @@ -66,6 +69,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Tests for {@code IgniteDataStreamerImpl}. */ +@RunWith(JUnit4.class) public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -114,6 +118,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCloseWithCancellation() throws Exception { cnt = 0; @@ -142,6 +147,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNullPointerExceptionUponDataStreamerClosing() throws Exception { cnt = 0; @@ -189,6 +195,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAddDataFromMap() throws Exception { cnt = 0; @@ -225,6 +232,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { * * @throws Exception If fail. */ + @Test public void testNoDataNodesOnClose() throws Exception { boolean failed = false; @@ -254,6 +262,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { * * @throws Exception If fail. */ + @Test public void testNoDataNodesOnFlush() throws Exception { boolean failed = false; @@ -296,6 +305,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAllOperationFinishedBeforeFutureCompletion() throws Exception { cnt = 0; @@ -348,6 +358,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRemapOnTopologyChangeDuringUpdatePreparation() throws Exception { cnt = 0; @@ -430,6 +441,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { * * @throws Exception if failed */ + @Test public void testRetryWhenTopologyMismatch() throws Exception { final int KEY = 1; final String VAL = "1"; @@ -465,6 +477,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientEventsNotCausingRemaps() throws Exception { Ignite ignite = startGrids(2); @@ -493,6 +506,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServerEventsCauseRemaps() throws Exception { Ignite ignite = startGrids(2); @@ -525,6 +539,7 @@ public class DataStreamerImplSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDataStreamerWaitsUntilDynamicCacheStartIsFinished() throws Exception { final Ignite ignite0 = startGrids(2); final Ignite ignite1 = grid(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java index 6d7b367..2462d0c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultiThreadedSelfTest.java @@ -34,12 +34,16 @@ 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.PARTITIONED; /** * Tests for DataStreamer. */ +@RunWith(JUnit4.class) public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStopIgnites() throws Exception { startStopIgnites(); } @@ -91,6 +96,7 @@ public class DataStreamerMultiThreadedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStopIgnitesDynamicCache() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1602"); @@ -141,4 +147,4 @@ public class DataStreamerMultiThreadedSelfTest 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/datastreamer/DataStreamerMultinodeCreateCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java index 3725288..dc4c680 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerMultinodeCreateCacheTest.java @@ -29,10 +29,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 DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -57,6 +61,7 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testCreateCacheAndStream() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-1603"); @@ -99,4 +104,4 @@ public class DataStreamerMultinodeCreateCacheTest extends GridCommonAbstractTest fut.get(2 * 60_000); } -} \ 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/datastreamer/DataStreamerTimeoutTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java index 6e88adf..f11f10d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerTimeoutTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.stream.StreamReceiver; 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; @@ -37,6 +40,7 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * Test timeout for Data streamer. */ +@RunWith(JUnit4.class) public class DataStreamerTimeoutTest extends GridCommonAbstractTest { /** Cache name. */ public static final String CACHE_NAME = "cacheName"; @@ -79,6 +83,7 @@ public class DataStreamerTimeoutTest extends GridCommonAbstractTest { * Test timeout on {@code DataStreamer.addData()} method * @throws Exception If fail. */ + @Test public void testTimeoutOnCloseMethod() throws Exception { failOn = 1; @@ -109,6 +114,7 @@ public class DataStreamerTimeoutTest extends GridCommonAbstractTest { * * @throws Exception If fail. */ + @Test public void testTimeoutOnAddData() throws Exception { failOn = 1; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java index bdfc116..52b4d19 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerUpdateAfterLoadTest.java @@ -30,12 +30,16 @@ 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.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; /** * */ +@RunWith(JUnit4.class) public class DataStreamerUpdateAfterLoadTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -71,6 +75,7 @@ public class DataStreamerUpdateAfterLoadTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testUpdateAfterLoad() throws Exception { Ignite ignite0 = ignite(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java index f7c8294..b6bcec1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/IgniteDataStreamerPerformanceTest.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; @@ -41,6 +44,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_FINISHED; * <p> * Disable assertions and give at least 2 GB heap to run this test. */ +@RunWith(JUnit4.class) public class IgniteDataStreamerPerformanceTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -115,6 +119,7 @@ public class IgniteDataStreamerPerformanceTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPerformance() throws Exception { doTest(); } @@ -195,4 +200,4 @@ public class IgniteDataStreamerPerformanceTest 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/igfs/IgfsAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java index 497d66e..bfc259a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java @@ -59,6 +59,9 @@ import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; import static org.apache.ignite.igfs.IgfsMode.PROXY; @@ -67,6 +70,7 @@ import static org.apache.ignite.igfs.IgfsMode.PROXY; * Test fo regular igfs operations. */ @SuppressWarnings({"ConstantConditions"}) +@RunWith(JUnit4.class) public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { /** * Constructor. @@ -82,6 +86,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testExists() throws Exception { create(igfs, paths(DIR), null); @@ -93,6 +98,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testExistsPathDoesNotExist() throws Exception { assert !igfs.exists(DIR); } @@ -102,6 +108,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testListFiles() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -124,6 +131,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testListFilesPathDoesNotExist() throws Exception { Collection<IgfsFile> paths = null; @@ -142,6 +150,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testInfo() throws Exception { create(igfs, paths(DIR), null); @@ -157,6 +166,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testInfoPathDoesNotExist() throws Exception { IgfsFile info = null; @@ -176,6 +186,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameFile() throws Exception { create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -190,6 +201,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameFileParentRoot() throws Exception { IgfsPath file1 = new IgfsPath("/file1"); IgfsPath file2 = new IgfsPath("/file2"); @@ -208,6 +220,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -222,6 +235,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testRenameDirectoryParentRoot() throws Exception { IgfsPath dir1 = new IgfsPath("/dir1"); IgfsPath dir2 = new IgfsPath("/dir2"); @@ -240,6 +254,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFile() throws Exception { create(igfs, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -254,6 +269,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileDestinationRoot() throws Exception { create(igfs, paths(DIR, SUBDIR), paths(FILE)); @@ -268,6 +284,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveFileSourceParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -285,6 +302,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFile() throws Exception { create(igfs, paths(DIR, SUBDIR, DIR_NEW, SUBDIR_NEW), paths(FILE)); @@ -299,6 +317,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileDestinationRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -315,6 +334,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameFileSourceParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE_NEW.name()); @@ -332,6 +352,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); @@ -346,6 +367,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectoryDestinationRoot() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), null); @@ -360,6 +382,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveDirectorySourceParentRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -377,6 +400,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectory() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR, DIR_NEW, SUBDIR_NEW), null); @@ -391,6 +415,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectoryDestinationRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR.name()); @@ -407,6 +432,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameDirectorySourceParentRoot() throws Exception { IgfsPath dir = new IgfsPath("/" + SUBSUBDIR_NEW.name()); @@ -423,6 +449,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testMoveRenameSourceDoesNotExist() throws Exception { create(igfs, paths(DIR, DIR_NEW), null); @@ -443,6 +470,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testMkdirs() throws Exception { if (!propertiesSupported()) return; @@ -520,6 +548,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testMkdirsParentRoot() throws Exception { Map<String, String> props = null; @@ -546,6 +575,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDelete() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -559,6 +589,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeleteParentRoot() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); @@ -572,6 +603,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeleteDirectoryNotEmpty() throws Exception { create(igfs, paths(DIR, SUBDIR, SUBSUBDIR), paths(FILE)); checkExist(igfs, igfsSecondary, SUBDIR, SUBSUBDIR, FILE); @@ -594,6 +626,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testUpdate() throws Exception { if(!propertiesSupported()) return; @@ -616,6 +649,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testUpdateParentRoot() throws Exception { if(!propertiesSupported()) return; @@ -637,6 +671,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testUpdatePathDoesNotExist() throws Exception { final Map<String, String> props = properties("owner", "group", "0555"); @@ -651,6 +686,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testFormat() throws Exception { if (mode == PROXY) return; @@ -721,6 +757,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testRootPropertiesPersistAfterFormat() throws Exception { if(!propertiesSupported()) return; @@ -761,6 +798,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testOpen() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -777,6 +815,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testOpenDoesNotExist() throws Exception { igfsSecondary.delete(FILE.toString(), false); @@ -800,6 +839,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testSetTimes() throws Exception { createFile(igfs, FILE, true, chunk); @@ -909,6 +949,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings({"ConstantConditions", "EmptyTryBlock"}) + @Test public void testCreate() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -993,6 +1034,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateParentRoot() throws Exception { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -1006,6 +1048,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1035,6 +1078,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateRenameNoClose() throws Exception { if (dual) return; @@ -1060,6 +1104,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateRenameParentNoClose() throws Exception { if (dual) return; @@ -1085,6 +1130,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateDeleteNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1139,6 +1185,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateDeleteParentNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1193,6 +1240,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateUpdateNoClose() throws Exception { if (dual) return; @@ -1223,6 +1271,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception On error. */ + @Test public void testSimpleWrite() throws Exception { IgfsPath path = new IgfsPath("/file1"); @@ -1258,6 +1307,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateConsistency() throws Exception { final AtomicInteger ctr = new AtomicInteger(); final AtomicReference<Exception> err = new AtomicReference<>(); @@ -1300,6 +1350,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testCreateConsistencyMultithreaded() throws Exception { final AtomicBoolean stop = new AtomicBoolean(); @@ -1379,6 +1430,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * @throws Exception If failed. */ @SuppressWarnings({"EmptyTryBlock"}) + @Test public void testAppend() throws Exception { if (appendSupported()) { create(igfs, paths(DIR, SUBDIR), null); @@ -1519,6 +1571,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendParentRoot() throws Exception { if (appendSupported()) { IgfsPath file = new IgfsPath("/" + FILE.name()); @@ -1536,6 +1589,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1570,6 +1624,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendRenameNoClose() throws Exception { if (dual) return; @@ -1598,6 +1653,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendRenameParentNoClose() throws Exception { if (dual) return; @@ -1626,6 +1682,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendDeleteNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1681,6 +1738,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendDeleteParentNoClose() throws Exception { if (mode != PRIMARY) return; @@ -1736,6 +1794,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendUpdateNoClose() throws Exception { if (dual) return; @@ -1767,6 +1826,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendConsistency() throws Exception { if (appendSupported()) { final AtomicInteger ctr = new AtomicInteger(); @@ -1818,6 +1878,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testAppendConsistencyMultithreaded() throws Exception { if (appendSupported()) { final AtomicBoolean stop = new AtomicBoolean(); @@ -1891,6 +1952,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testStop() throws Exception { create(igfs, paths(DIR, SUBDIR), null); @@ -1911,6 +1973,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentMkdirsDelete() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -1959,6 +2022,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteSource() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2023,6 +2087,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentRenameDeleteDestination() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2079,6 +2144,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentRenames() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2139,6 +2205,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testConcurrentDeletes() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); @@ -2186,6 +2253,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksRename() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, 0, 0, 0, 0); } @@ -2195,6 +2263,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksDelete() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, DELETE_CNT, 0, 0, 0); } @@ -2204,6 +2273,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksUpdate() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, 0, UPDATE_CNT, 0, 0); } @@ -2213,6 +2283,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksMkdirs() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, 0, 0, MKDIRS_CNT, 0); } @@ -2222,6 +2293,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksDeleteRename() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, DELETE_CNT, 0, 0, 0); } @@ -2231,6 +2303,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksDeleteMkdirsRename() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, DELETE_CNT, 0, MKDIRS_CNT, 0); } @@ -2240,6 +2313,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksDeleteMkdirs() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, DELETE_CNT, 0, MKDIRS_CNT, 0); } @@ -2249,6 +2323,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocksCreate() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, 0, 0, 0, 0, CREATE_CNT); } @@ -2258,6 +2333,7 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest { * * @throws Exception If failed. */ + @Test public void testDeadlocks() throws Exception { checkDeadlocksRepeat(5, 2, 2, 2, RENAME_CNT, DELETE_CNT, UPDATE_CNT, MKDIRS_CNT, CREATE_CNT); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java index b430a8c..5ff9b0a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAttributesSelfTest.java @@ -27,6 +27,9 @@ import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.Map; import org.apache.ignite.igfs.IgfsMode; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.igfs.IgfsMode.DUAL_SYNC; import static org.apache.ignite.igfs.IgfsMode.PRIMARY; @@ -35,10 +38,12 @@ import static org.apache.ignite.igfs.IgfsMode.PROXY; /** * {@link IgfsAttributes} test case. */ +@RunWith(JUnit4.class) public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSerialization() throws Exception { Map<String, IgfsMode> pathModes = new HashMap<>(); @@ -79,4 +84,4 @@ public class IgfsAttributesSelfTest extends IgfsCommonAbstractTest { return true; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java index ff9c51a..1b3c6a2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBackupFailoverSelfTest.java @@ -37,6 +37,9 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; 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; @@ -53,6 +56,7 @@ import static org.apache.ignite.internal.processors.igfs.IgfsAbstractSelfTest.wr * Tests IGFS behavioral guarantees if some nodes on the cluster are synchronously or asynchronously stopped. * The operations to check are read, write or both. */ +@RunWith(JUnit4.class) public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { /** Directory. */ protected static final IgfsPath DIR = new IgfsPath("/dir"); @@ -205,6 +209,7 @@ public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { * * @throws Exception On error. */ + @Test public void testReadFailoverAfterStopMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -259,6 +264,7 @@ public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { * * @throws Exception On error. */ + @Test public void testReadFailoverWhileStoppingMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -340,6 +346,7 @@ public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { * * @throws Exception On error. */ + @Test public void testWriteFailoverAfterStopMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -434,6 +441,7 @@ public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { * * @throws Exception */ + @Test public void testWriteFailoverWhileStoppingMultipleNodes() throws Exception { final IgfsImpl igfs0 = nodeDatas[0].igfsImpl; @@ -598,4 +606,4 @@ public class IgfsBackupFailoverSelfTest extends IgfsCommonAbstractTest { @Override protected long getTestTimeout() { return 20 * 60 * 1000; } -} \ 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/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java index 9012e0e..e3894e0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsBlockMessageSystemPoolStarvationSelfTest.java @@ -41,6 +41,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC; @@ -50,6 +53,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Test to check for system pool starvation due to {@link IgfsBlocksMessage}. */ +@RunWith(JUnit4.class) public class IgfsBlockMessageSystemPoolStarvationSelfTest extends IgfsCommonAbstractTest { /** First node name. */ private static final String NODE_1_NAME = "node1"; @@ -106,6 +110,7 @@ public class IgfsBlockMessageSystemPoolStarvationSelfTest extends IgfsCommonAbst * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testStarvation() throws Exception { // 1. Create two IGFS file to make all system threads busy. CountDownLatch fileWriteLatch = new CountDownLatch(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java index 3d9dbe9..f86a9f0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; +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; @@ -55,6 +58,7 @@ import static org.apache.ignite.igfs.IgfsMode.PRIMARY; * Tests for IGFS per-block LR eviction policy. */ @SuppressWarnings({"ConstantConditions"}) +@RunWith(JUnit4.class) public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstractTest { /** Primary IGFS name. */ private static final String IGFS_PRIMARY = "igfs-primary"; @@ -243,6 +247,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra * * @throws Exception If failed. */ + @Test public void testFilePrimary() throws Exception { start(); @@ -267,6 +272,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra * * @throws Exception If failed. */ + @Test public void testFileDual() throws Exception { start(); @@ -297,6 +303,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra * * @throws Exception If failed. */ + @Test public void testFileDualExclusion() throws Exception { start(); @@ -324,6 +331,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra * * @throws Exception If failed. */ + @Test public void testRenameDifferentExcludeSettings() throws Exception { start(); @@ -351,6 +359,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra * * @throws Exception If failed. */ + @Test public void testBlockCountEviction() throws Exception { start(); @@ -386,6 +395,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra * * @throws Exception If failed. */ + @Test public void testDataSizeEviction() throws Exception { start(); @@ -493,4 +503,4 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra }, 5000) : "Unexpected counts [expectedBlocks=" + curBlocks + ", actualBlocks=" + evictPlc.getCurrentBlocks() + ", expectedBytes=" + curBytes + ", currentBytes=" + curBytes + ']'; } -} \ 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/igfs/IgfsCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java index f8f3a0c..2bb2216 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java @@ -33,6 +33,9 @@ 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.jetbrains.annotations.NotNull; +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.REPLICATED; /** * Tests ensuring that IGFS data and meta caches are not "visible" through public API. */ +@RunWith(JUnit4.class) public class IgfsCacheSelfTest extends IgfsCommonAbstractTest { /** Regular cache name. */ private static final String CACHE_NAME = "cache"; @@ -100,6 +104,7 @@ public class IgfsCacheSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testCache() throws Exception { final Ignite g = grid(); @@ -133,4 +138,4 @@ public class IgfsCacheSelfTest extends IgfsCommonAbstractTest { assert g.cache(CACHE_NAME) != null; } -} \ 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/igfs/IgfsDataManagerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java index c07f0ba..21f7194 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDataManagerSelfTest.java @@ -45,6 +45,9 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.concurrent.Callable; +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; @@ -54,6 +57,7 @@ import static org.apache.ignite.testframework.GridTestUtils.sleepAndIncrement; /** * {@link IgfsDataManager} test case. */ +@RunWith(JUnit4.class) public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { /** Test IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -151,6 +155,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testDataStoring() throws Exception { for (int i = 0; i < 10; i++) { IgfsPath path = IgfsPath.ROOT; @@ -235,6 +240,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testDataStoringRemainder() throws Exception { final int blockSize = IGFS_BLOCK_SIZE; @@ -326,6 +332,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testDataStoringFlush() throws Exception { final int blockSize = IGFS_BLOCK_SIZE; final int writesCnt = 64; @@ -400,6 +407,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAffinity() throws Exception { final int blockSize = 10; final int grpSize = blockSize * DATA_BLOCK_GROUP_CNT; @@ -453,6 +461,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAffinity2() throws Exception { int blockSize = BLOCK_SIZE; @@ -488,6 +497,7 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { } /** @throws Exception If failed. */ + @Test public void testAffinityFileMap() throws Exception { int blockSize = BLOCK_SIZE; @@ -616,4 +626,4 @@ public class IgfsDataManagerSelfTest extends IgfsCommonAbstractTest { } }, IgfsException.class, msg); } -} \ No newline at end of file +}