http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java index 23c7e08..79a2116 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlerTriggeredTest.java @@ -29,14 +29,19 @@ import org.apache.ignite.internal.util.worker.GridWorker; import org.apache.ignite.testframework.GridTestUtils; 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; /** * Test of triggering of failure handler. */ +@RunWith(JUnit4.class) public class FailureHandlerTriggeredTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFailureHandlerTriggeredOnExchangeWorkerTermination() throws Exception { try { CountDownLatch latch = new CountDownLatch(1);
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java index 4e5b753..b7a9f1d 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/FailureHandlingConfigurationTest.java @@ -33,6 +33,9 @@ import org.apache.ignite.internal.worker.FailureHandlingMxBeanImpl; import org.apache.ignite.internal.worker.WorkersRegistry; import org.apache.ignite.mxbean.FailureHandlingMxBean; 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.IgniteSystemProperties.IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT; import static org.apache.ignite.IgniteSystemProperties.IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT; @@ -40,6 +43,7 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_SYSTEM_WORKER_BLOC /** * Tests configuration parameters related to failure handling. */ +@RunWith(JUnit4.class) public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** */ private Long checkpointReadLockTimeout; @@ -106,6 +110,7 @@ public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCfgParamsPropagation() throws Exception { sysWorkerBlockedTimeout = 30_000L; checkpointReadLockTimeout = 20_000L; @@ -130,6 +135,7 @@ public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPartialCfgParamsPropagation() throws Exception { sysWorkerBlockedTimeout = 30_000L; checkpointReadLockTimeout = null; @@ -154,6 +160,7 @@ public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNegativeParamValues() throws Exception { sysWorkerBlockedTimeout = -1L; checkpointReadLockTimeout = -85L; @@ -178,6 +185,7 @@ public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOverridingBySysProps() throws Exception { String prevWorkerProp = System.getProperty(IGNITE_SYSTEM_WORKER_BLOCKED_TIMEOUT); String prevCheckpointProp = System.getProperty(IGNITE_CHECKPOINT_READ_LOCK_TIMEOUT); @@ -228,6 +236,7 @@ public class FailureHandlingConfigurationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMBeanParamsChanging() throws Exception { IgniteEx ignite = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java index 7557d34..6c9304b 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/IoomFailureHandlerTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.mem.IgniteOutOfMemoryException; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * IgniteOutOfMemoryError failure handler test. */ +@RunWith(JUnit4.class) public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** Offheap size for memory policy. */ private static final int SIZE = 10 * 1024 * 1024; @@ -96,6 +100,7 @@ public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test IgniteOutOfMemoryException handling with no store. */ + @Test public void testIoomErrorNoStoreHandling() throws Exception { testIoomErrorHandling(false, false); } @@ -103,6 +108,7 @@ public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test IgniteOutOfMemoryException handling with PDS. */ + @Test public void testIoomErrorPdsHandling() throws Exception { testIoomErrorHandling(true, false); } @@ -110,6 +116,7 @@ public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test IgniteOutOfMemoryException handling with no store. */ + @Test public void testIoomErrorMvccNoStoreHandling() throws Exception { testIoomErrorHandling(false, true); } @@ -117,6 +124,7 @@ public class IoomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test IgniteOutOfMemoryException handling with PDS. */ + @Test public void testIoomErrorMvccPdsHandling() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-10185"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java index 2af94b8..243316a 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/OomFailureHandlerTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Out of memory error failure handler test. */ +@RunWith(JUnit4.class) public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -64,6 +68,7 @@ public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test OOME in IgniteCompute. */ + @Test public void testComputeOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -88,6 +93,7 @@ public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test OOME in EntryProcessor. */ + @Test public void testEntryProcessorOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -121,6 +127,7 @@ public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test OOME in service method invocation. */ + @Test public void testServiceInvokeOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -149,6 +156,7 @@ public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test OOME in service execute. */ + @Test public void testServiceExecuteOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); @@ -168,6 +176,7 @@ public class OomFailureHandlerTest extends AbstractFailureHandlerTest { /** * Test OOME in event listener. */ + @Test public void testEventListenerOomError() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java index fb75aae..c6f13f7 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeFailureHandlerTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.internal.util.typedef.PE; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link StopNodeFailureHandler} tests. */ +@RunWith(JUnit4.class) public class StopNodeFailureHandlerTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected FailureHandler getFailureHandler(String igniteInstanceName) { @@ -43,6 +47,7 @@ public class StopNodeFailureHandlerTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNodeStopped() throws Exception { try { IgniteEx ignite0 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java index 05e3e6e..86af2a3 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/StopNodeOrHaltFailureHandlerTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.util.typedef.PE; import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.multijvm.IgniteProcessProxy; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * {@link StopNodeOrHaltFailureHandler} tests. */ +@RunWith(JUnit4.class) public class StopNodeOrHaltFailureHandlerTest extends GridCommonAbstractTest { /** Number of grids started for tests. */ public static final int NODES_CNT = 3; @@ -56,6 +60,7 @@ public class StopNodeOrHaltFailureHandlerTest extends GridCommonAbstractTest { /** * Tests failed node's JVM is halted after triggering StopNodeOrHaltFailureHandler. */ + @Test public void testJvmHalted() throws Exception { IgniteEx g = grid(0); IgniteEx rmt1 = grid(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java index 3ca7948..a228126 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersBlockingTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.util.worker.GridWorker; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests the handling of long blocking operations in system-critical workers. */ +@RunWith(JUnit4.class) public class SystemWorkersBlockingTest extends GridCommonAbstractTest { /** Handler latch. */ private static volatile CountDownLatch hndLatch; @@ -72,6 +76,7 @@ public class SystemWorkersBlockingTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBlockingWorker() throws Exception { IgniteEx ignite = grid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java index 1cebe22..9dadff6 100644 --- a/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java +++ b/modules/core/src/test/java/org/apache/ignite/failure/SystemWorkersTerminationTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.internal.worker.WorkersRegistry; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.thread.IgniteThread; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests system critical workers termination. */ +@RunWith(JUnit4.class) public class SystemWorkersTerminationTest extends GridCommonAbstractTest { /** */ private static volatile String failureHndThreadName; @@ -75,6 +79,7 @@ public class SystemWorkersTerminationTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSyntheticWorkerTermination() throws Exception { IgniteEx ignite = grid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java index bb84ae3..33a610f 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsEventsAbstractSelfTest.java @@ -38,6 +38,9 @@ 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.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.testframework.GridTestUtils.assertOneToOne; /** * Tests events, generated by {@link org.apache.ignite.IgniteFileSystem} implementation. */ +@RunWith(JUnit4.class) public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest { /** IGFS. */ private static IgfsImpl igfs; @@ -184,6 +188,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testSingleFileNestedDirs() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -265,6 +270,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testDirWithFiles() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -346,6 +352,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testSingleEmptyDir() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -403,6 +410,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testTwoFiles() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -490,6 +498,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testDeleteNonRecursive() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -544,6 +553,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testMoveFile() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -611,6 +621,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testNestedEmptyDirs() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -661,6 +672,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testSingleFileOverwrite() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -747,6 +759,7 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest * * @throws Exception If failed. */ + @Test public void testFileDataEvents() throws Exception { final List<Event> evtList = new ArrayList<>(); @@ -836,4 +849,4 @@ public abstract class IgfsEventsAbstractSelfTest extends GridCommonAbstractTest return e0.type() == evt && e0.path().equals(path); } } -} \ 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/igfs/IgfsFragmentizerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java index b95fc9c..1d24252 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerSelfTest.java @@ -28,14 +28,19 @@ import org.apache.ignite.internal.processors.igfs.IgfsImpl; import org.apache.ignite.internal.util.typedef.CA; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests fragmentizer work. */ +@RunWith(JUnit4.class) public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testReadFragmentizing() throws Exception { IgniteFileSystem igfs = grid(0).fileSystem("igfs"); @@ -70,6 +75,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizing() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE / 4, false); } @@ -77,6 +83,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizingAligned() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE, false); } @@ -84,6 +91,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizingDifferentNodes() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE / 4, true); } @@ -91,6 +99,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testAppendFragmentizingAlignedDifferentNodes() throws Exception { checkAppendFragmentizing(IGFS_BLOCK_SIZE, true); } @@ -158,6 +167,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testFlushFragmentizing() throws Exception { checkFlushFragmentizing(IGFS_BLOCK_SIZE / 4); } @@ -165,6 +175,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testFlushFragmentizingAligned() throws Exception { checkFlushFragmentizing(IGFS_BLOCK_SIZE); } @@ -223,6 +234,7 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testDeleteFragmentizing() throws Exception { IgfsImpl igfs = (IgfsImpl)grid(0).fileSystem("igfs"); @@ -265,4 +277,4 @@ public class IgfsFragmentizerSelfTest extends IgfsFragmentizerAbstractSelfTest { while(read < data.length) read += in.read(data, read, data.length - read); } -} \ 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/igfs/IgfsFragmentizerTopologySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java index 9cc5006..ffed70d 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsFragmentizerTopologySelfTest.java @@ -18,14 +18,19 @@ package org.apache.ignite.igfs; import org.apache.ignite.IgniteFileSystem; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests coordinator transfer from one node to other. */ +@RunWith(JUnit4.class) public class IgfsFragmentizerTopologySelfTest extends IgfsFragmentizerAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testCoordinatorLeave() throws Exception { stopGrid(0); @@ -46,4 +51,4 @@ public class IgfsFragmentizerTopologySelfTest extends IgfsFragmentizerAbstractSe startGrid(0); } } -} \ 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/igfs/IgfsPathSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java index 8e25054..b103366 100644 --- a/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/igfs/IgfsPathSelfTest.java @@ -28,10 +28,14 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.GridTestUtils; 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; /** * {@link IgfsPath} self test. */ +@RunWith(JUnit4.class) public class IgfsPathSelfTest extends GridCommonAbstractTest { /** Marshaller to test {@link Externalizable} interface. */ private final Marshaller marshaller; @@ -46,6 +50,7 @@ public class IgfsPathSelfTest extends GridCommonAbstractTest { * * @throws Exception In case of any exception. */ + @Test public void testMethods() throws Exception { IgfsPath path = new IgfsPath("/a/s/d/f"); @@ -96,6 +101,7 @@ public class IgfsPathSelfTest extends GridCommonAbstractTest { * @throws Exception In case of any exception. */ @SuppressWarnings("TooBroadScope") + @Test public void testConstructors() throws Exception { String pathStr = "///"; URI uri = URI.create(pathStr); @@ -157,4 +163,4 @@ public class IgfsPathSelfTest extends GridCommonAbstractTest { } }, cls, 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/ClassSetTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java index c51957a..2f27225 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClassSetTest.java @@ -18,14 +18,19 @@ package org.apache.ignite.internal; import junit.framework.TestCase; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for {@link ClassSet} class. */ +@RunWith(JUnit4.class) public class ClassSetTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testAddAndContains() throws Exception { ClassSet clsSet = new ClassSet(); @@ -39,6 +44,7 @@ public class ClassSetTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testAddWithMaskAndContains() throws Exception { ClassSet clsSet = new ClassSet(); @@ -52,6 +58,7 @@ public class ClassSetTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testReduceOnAddWithMask() throws Exception { ClassSet clsSet = new ClassSet(); @@ -68,4 +75,4 @@ public class ClassSetTest extends TestCase { assertTrue(clsSet.contains("org.apache.ignite.Ignition")); assertTrue(clsSet.contains("org.apache.ignite.NotIgnite")); } -} \ 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/ClusterBaselineNodesMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java index 46b09ac..b0b921d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterBaselineNodesMetricsSelfTest.java @@ -36,11 +36,15 @@ 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.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Baseline nodes metrics self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterBaselineNodesMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -53,6 +57,7 @@ public class ClusterBaselineNodesMetricsSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testBaselineNodes() throws Exception { // Start 2 server nodes. IgniteEx ignite0 = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java index fbf938d..4d6bafb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupAbstractTest.java @@ -57,6 +57,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_JOB_STARTED; @@ -64,6 +67,7 @@ import static org.apache.ignite.events.EventType.EVT_JOB_STARTED; * Abstract test for {@link org.apache.ignite.cluster.ClusterGroup} */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest implements Externalizable { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -184,6 +188,7 @@ public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest im /** * Test for projection on not existing node IDs. */ + @Test public void testInvalidProjection() { Collection<UUID> ids = new HashSet<>(); @@ -198,6 +203,7 @@ public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest im /** * @throws Exception If test failed. */ + @Test public void testProjection() throws Exception { assert prj != null; @@ -217,6 +223,7 @@ public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest im /** * @throws Exception If test failed. */ + @Test public void testRemoteNodes() throws Exception { Collection<UUID> remoteNodeIds = remoteNodeIds(); @@ -247,6 +254,7 @@ public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest im /** * @throws Exception If test failed. */ + @Test public void testRemoteProjection() throws Exception { Collection<UUID> remoteNodeIds = remoteNodeIds(); @@ -277,6 +285,7 @@ public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest im /** * @throws Exception If test failed. */ + @Test public void testExecution() throws Exception { String name = "oneMoreGrid"; @@ -757,4 +766,4 @@ public abstract class ClusterGroupAbstractTest extends GridCommonAbstractTest im @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // No-op. } -} \ 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/ClusterGroupHostsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java index 141f4af..8d2b432 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupHostsSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link ClusterGroup#forHost(String, String...)}. @@ -36,6 +39,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonTest; * @see ClusterGroupSelfTest */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { @@ -60,6 +64,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForHosts() throws Exception { if (!tcpDiscovery()) return; @@ -89,6 +94,7 @@ public class ClusterGroupHostsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testHostNames() throws Exception { Ignite ignite = grid(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java index 0c4812f..0fb9f80 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterGroupSelfTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link ClusterGroup}. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** Nodes count. */ private static final int NODES_CNT = 4; @@ -89,6 +93,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandom() throws Exception { assertTrue(ignite.cluster().nodes().contains(ignite.cluster().forRandom().node())); } @@ -96,6 +101,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOldest() throws Exception { ClusterGroup oldest = ignite.cluster().forOldest(); @@ -121,6 +127,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testYoungest() throws Exception { ClusterGroup youngest = ignite.cluster().forYoungest(); @@ -146,6 +153,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForDaemons() throws Exception { assertEquals(4, ignite.cluster().nodes().size()); @@ -171,6 +179,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNewNodes() throws Exception { ClusterGroup youngest = ignite.cluster().forYoungest(); ClusterGroup oldest = ignite.cluster().forOldest(); @@ -194,6 +203,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForPredicate() throws Exception { IgnitePredicate<ClusterNode> evenP = new IgnitePredicate<ClusterNode>() { @Override public boolean apply(ClusterNode node) { @@ -237,6 +247,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAgeClusterGroupSerialization() throws Exception { Marshaller marshaller = ignite.configuration().getMarshaller(); @@ -260,6 +271,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientServer() throws Exception { ClusterGroup srv = ignite.cluster().forServers(); @@ -277,6 +289,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForCacheNodesOnDynamicCacheCreateDestroy() throws Exception { Random rnd = ThreadLocalRandom.current(); @@ -294,6 +307,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForClientNodesOnDynamicCacheCreateDestroy() throws Exception { Random rnd = ThreadLocalRandom.current(); @@ -370,6 +384,7 @@ public class ClusterGroupSelfTest extends ClusterGroupAbstractTest { /** * @throws Exception If failed. */ + @Test public void testEmptyGroup() throws Exception { ClusterGroup emptyGrp = ignite.cluster().forAttribute("nonExistent", "val"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java index 7168d3a..7946051 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterMetricsSelfTest.java @@ -34,6 +34,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_JOB_FINISHED; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; @@ -42,6 +45,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; * Tests for projection metrics. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final int NODES_CNT = 4; @@ -69,6 +73,7 @@ public class ClusterMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testEmptyProjection() throws Exception { try { grid(0).cluster().forPredicate(F.<ClusterNode>alwaysFalse()).metrics(); @@ -83,6 +88,7 @@ public class ClusterMetricsSelfTest extends GridCommonAbstractTest { /** * */ + @Test public void testTaskExecution() { for (int i = 0; i < ITER_CNT; i++) { info("Starting new iteration: " + i); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java index 22bb07f..6f99fab 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java @@ -51,6 +51,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.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_METRICS_UPDATED; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_BUILD_VER; @@ -61,6 +64,7 @@ import static org.apache.ignite.internal.IgniteVersionUtils.VER_STR; * Grid node metrics self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -120,6 +124,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAllocatedMemory() throws Exception { IgniteEx ignite = grid(); @@ -185,6 +190,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleTaskMetrics() throws Exception { Ignite ignite = grid(); @@ -243,6 +249,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testInternalTaskMetrics() throws Exception { Ignite ignite = grid(); @@ -300,6 +307,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIoMetrics() throws Exception { Ignite ignite0 = grid(); Ignite ignite1 = startGrid(1); @@ -353,6 +361,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClusterNodeMetrics() throws Exception { final Ignite ignite0 = grid(); final Ignite ignite1 = startGrid(1); @@ -381,6 +390,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testJmxClusterMetrics() throws Exception { Ignite node = grid(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java index 6e6b4a4..23d3700 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsUpdateTest.java @@ -35,10 +35,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 ClusterNodeMetricsUpdateTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public class ClusterNodeMetricsUpdateTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { int NODES = 6; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java index 6978ba2..a9824c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/ComputeJobCancelWithServiceSelfTest.java @@ -36,10 +36,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test cancellation of a job that depends on service. */ +@RunWith(JUnit4.class) public class ComputeJobCancelWithServiceSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -61,6 +65,7 @@ public class ComputeJobCancelWithServiceSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testJobCancel() throws Exception { Ignite server = startGrid("server"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java index 79c9031..dca9019 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityMappedTest.java @@ -32,12 +32,16 @@ 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; /** * Tests affinity mapping when {@link AffinityKeyMapper} is used. */ +@RunWith(JUnit4.class) public class GridAffinityMappedTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -88,6 +92,7 @@ public class GridAffinityMappedTest extends GridCommonAbstractTest { /** * @throws IgniteCheckedException If failed. */ + @Test public void testMappedAffinity() throws IgniteCheckedException { Ignite g1 = grid(1); Ignite g2 = grid(2); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java index bdd1ce6..24d2659 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityNoCacheSelfTest.java @@ -34,10 +34,14 @@ import org.apache.ignite.plugin.extensions.communication.MessageWriter; import org.apache.ignite.testframework.GridTestUtils; 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; /** * Tests usage of affinity in case when cache doesn't exist. */ +@RunWith(JUnit4.class) public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** */ public static final String EXPECTED_MSG = "Failed to find cache"; @@ -52,6 +56,7 @@ public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityProxyNoCache() throws Exception { checkAffinityProxyNoCache(new Object()); } @@ -59,6 +64,7 @@ public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityProxyNoCacheCacheObject() throws Exception { checkAffinityProxyNoCache(new TestCacheObject(new Object())); } @@ -81,6 +87,7 @@ public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityImplCacheDeleted() throws Exception { checkAffinityImplCacheDeleted(new Object()); } @@ -88,6 +95,7 @@ public class GridAffinityNoCacheSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityImplCacheDeletedCacheObject() throws Exception { checkAffinityImplCacheDeleted(new TestCacheObject(new Object())); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java index a87e5d3..8d3791b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinityP2PSelfTest.java @@ -37,12 +37,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestExternalClassLoader; import org.apache.ignite.testframework.config.GridTestProperties; 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 affinity and affinity mapper P2P loading. */ +@RunWith(JUnit4.class) public class GridAffinityP2PSelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -118,6 +122,7 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -129,6 +134,7 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testIsolatedMode() throws Exception { depMode = DeploymentMode.ISOLATED; @@ -140,6 +146,7 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -151,6 +158,7 @@ public class GridAffinityP2PSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testSharedMode() throws Exception { depMode = DeploymentMode.SHARED; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java index f85b2c0..106e178 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAffinitySelfTest.java @@ -33,12 +33,16 @@ 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; /** * Tests affinity mapping. */ +@RunWith(JUnit4.class) public class GridAffinitySelfTest extends GridCommonAbstractTest { /** VM ip finder for TCP discovery. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ public class GridAffinitySelfTest extends GridCommonAbstractTest { /** * @throws IgniteCheckedException If failed. */ + @Test public void testAffinity() throws Exception { Ignite g1 = grid(1); Ignite g2 = grid(2); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java index 6fd8a8a..c4cabfb 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridAlwaysFailoverSpiFailSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.spi.failover.FailoverContext; import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Always failover SPI test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridAlwaysFailoverSpiFailSelfTest extends GridCommonAbstractTest { /** */ private boolean isFailoverCalled; @@ -62,6 +66,7 @@ public class GridAlwaysFailoverSpiFailSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFailoverTask() throws Exception { isFailoverCalled = false; @@ -85,6 +90,7 @@ public class GridAlwaysFailoverSpiFailSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoneFailoverTask() throws Exception { isFailoverCalled = false; @@ -162,4 +168,4 @@ public class GridAlwaysFailoverSpiFailSelfTest extends GridCommonAbstractTest { throw this.<IgniteException>argument(0); } } -} \ 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/GridCachePartitionExchangeManagerHistSizeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java index 69d7368..a104e23 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCachePartitionExchangeManagerHistSizeTest.java @@ -23,12 +23,16 @@ 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.IgniteSystemProperties.IGNITE_EXCHANGE_HISTORY_SIZE; /** * Test exchange history size parameter effect. */ +@RunWith(JUnit4.class) public class GridCachePartitionExchangeManagerHistSizeTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -66,6 +70,7 @@ public class GridCachePartitionExchangeManagerHistSizeTest extends GridCommonAbs /** * @throws Exception If failed. */ + @Test public void testSingleExchangeHistSize() throws Exception { System.setProperty(IGNITE_EXCHANGE_HISTORY_SIZE, "1"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java index 61ed2b3..e06032e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelOnGridStopSelfTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test task cancellation on grid stop. */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCancelOnGridStopSelfTest extends GridCommonAbstractTest { /** */ private static CountDownLatch cnt; @@ -53,6 +57,7 @@ public class GridCancelOnGridStopSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCancelingJob() throws Exception { cancelCall = false; @@ -108,4 +113,4 @@ public class GridCancelOnGridStopSelfTest extends GridCommonAbstractTest { return 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/GridCancelUnusedJobSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java index 0aa340c..cf3cdf7 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelUnusedJobSelfTest.java @@ -41,11 +41,15 @@ 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.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cancel unused job test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCancelUnusedJobSelfTest extends GridCommonAbstractTest { /** */ private static final int WAIT_TIME = 100000; @@ -88,6 +92,7 @@ public class GridCancelUnusedJobSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCancel() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -220,4 +225,4 @@ public class GridCancelUnusedJobSelfTest extends GridCommonAbstractTest { cancelCnt++; } } -} \ 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/GridCancelledJobsMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java index a5d60cc..765b90c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCancelledJobsMetricsSelfTest.java @@ -47,11 +47,15 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Cancelled jobs metrics self test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCancelledJobsMetricsSelfTest extends GridCommonAbstractTest { /** */ private static GridCancelCollisionSpi colSpi = new GridCancelCollisionSpi(); @@ -80,6 +84,7 @@ public class GridCancelledJobsMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCancelledJobs() throws Exception { final Ignite ignite = G.ignite(getTestIgniteInstanceName()); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java index a18e7e7..24bed78 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCollisionJobsContextSelfTest.java @@ -34,11 +34,15 @@ import org.apache.ignite.spi.collision.CollisionJobContext; import org.apache.ignite.spi.collision.CollisionSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Collision job context test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCollisionJobsContextSelfTest extends GridCommonAbstractTest { /** */ public GridCollisionJobsContextSelfTest() { @@ -64,6 +68,7 @@ public class GridCollisionJobsContextSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testCollisionJobContext() throws Exception { G.ignite(getTestIgniteInstanceName()).compute().execute(new GridTestTask(), "some-arg"); } @@ -118,4 +123,4 @@ public class GridCollisionJobsContextSelfTest extends GridCommonAbstractTest { // No-op. } } -} \ 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/GridCommunicationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java index 57a108b..2bfd979 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridCommunicationSelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid basic communication test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridCommunicationSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; @@ -49,6 +53,7 @@ public class GridCommunicationSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSendMessageToEmptyNodes() throws Exception { Collection<ClusterNode> empty = Collections.emptyList(); @@ -121,4 +126,4 @@ public class GridCommunicationSelfTest extends GridCommonAbstractTest { return buf.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/GridComputationBinarylizableClosuresSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java index a0e49b0..e677d57 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridComputationBinarylizableClosuresSelfTest.java @@ -33,10 +33,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteClosure; import org.apache.ignite.lang.IgniteRunnable; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test ensuring that correct closures are serialized. */ +@RunWith(JUnit4.class) public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -88,6 +92,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testJob() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -110,6 +115,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testMasterLeaveAwareJob() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -134,6 +140,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testCallable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -153,6 +160,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testMasterLeaveAwareCallable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -174,6 +182,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testRunnable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); @@ -193,6 +202,7 @@ public class GridComputationBinarylizableClosuresSelfTest extends GridCommonAbst * * @throws Exception If failed. */ + @Test public void testMasterLeaveAwareRunnable() throws Exception { Ignite ignite = startGrid(1); startGrid(2); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java index 55ba0fe..5017360 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobAnnotationSelfTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.resources.TaskContinuousMapperResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for various job callback annotations. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridContinuousJobAnnotationSelfTest extends GridCommonAbstractTest { /** */ private static final AtomicBoolean fail = new AtomicBoolean(); @@ -70,6 +74,7 @@ public class GridContinuousJobAnnotationSelfTest extends GridCommonAbstractTest /** * @throws Exception If test failed. */ + @Test public void testJobAnnotation() throws Exception { testContinuousJobAnnotation(TestJob.class); } @@ -77,6 +82,7 @@ public class GridContinuousJobAnnotationSelfTest extends GridCommonAbstractTest /** * @throws Exception If test failed. */ + @Test public void testJobChildAnnotation() throws Exception { testContinuousJobAnnotation(TestJobChild.class); } @@ -224,4 +230,4 @@ public class GridContinuousJobAnnotationSelfTest extends GridCommonAbstractTest // No-op. } } -} \ 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/GridContinuousJobSiblingsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java index 5bbbd85..4f37ec4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousJobSiblingsSelfTest.java @@ -37,11 +37,15 @@ import org.apache.ignite.resources.TaskContinuousMapperResource; import org.apache.ignite.resources.TaskSessionResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test continuous mapper with siblings. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridContinuousJobSiblingsSelfTest extends GridCommonAbstractTest { /** */ private static final int JOB_COUNT = 10; @@ -49,6 +53,7 @@ public class GridContinuousJobSiblingsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobSiblings() throws Exception { try { Ignite ignite = startGrid(0); @@ -64,6 +69,7 @@ public class GridContinuousJobSiblingsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobSiblingsLocalNode() throws Exception { try { Ignite ignite = startGrid(0); @@ -154,4 +160,4 @@ public class GridContinuousJobSiblingsSelfTest extends GridCommonAbstractTest { return 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/GridContinuousTaskSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java index 6589dce..cb1d4ae 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridContinuousTaskSelfTest.java @@ -55,11 +55,15 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Continuous task test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** */ private static final int JOB_COUNT = 10; @@ -70,6 +74,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobsChain() throws Exception { try { Ignite ignite = startGrid(0); @@ -89,6 +94,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobsChainMultiThreaded() throws Exception { try { final Ignite ignite = startGrid(0); @@ -121,6 +127,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousJobsSessionChain() throws Exception { try { Ignite ignite = startGrid(0); @@ -137,6 +144,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testContinuousSlowMap() throws Exception { try { Ignite ignite = startGrid(0); @@ -154,6 +162,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testClearTimeouts() throws Exception { int holdccTimeout = 4000; @@ -176,6 +185,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testMultipleHoldccCalls() throws Exception { try { Ignite grid = startGrid(0); @@ -190,6 +200,7 @@ public class GridContinuousTaskSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testClosureWithNestedInternalTask() throws Exception { try { IgniteEx ignite = startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java index cabcba1..1b0f6d4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentMultiThreadedSelfTest.java @@ -31,12 +31,16 @@ import org.apache.ignite.compute.ComputeTaskAdapter; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * Task deployment tests. */ +@RunWith(JUnit4.class) public class GridDeploymentMultiThreadedSelfTest extends GridCommonAbstractTest { /** */ private static final int THREAD_CNT = 20; @@ -47,6 +51,7 @@ public class GridDeploymentMultiThreadedSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDeploy() throws Exception { try { final Ignite ignite = startGrid(0); @@ -123,4 +128,4 @@ public class GridDeploymentMultiThreadedSelfTest extends GridCommonAbstractTest return 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/GridDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java index 8f53fb4..000581a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDeploymentSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.IgniteSpiException; import org.apache.ignite.spi.deployment.local.LocalDeploymentSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_TASK_DEPLOYED; import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; @@ -48,6 +51,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; * Task deployment tests. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridDeploymentSelfTest extends GridCommonAbstractTest { /** */ private TestDeploymentSpi depSpi; @@ -108,6 +112,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeploy() throws Exception { Ignite ignite = startGrid(getTestIgniteInstanceName()); @@ -134,6 +139,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIgnoreDeploymentSpi() throws Exception { // If peer class loading is disabled and local deployment SPI // is configured, SPI should be ignored. @@ -160,6 +166,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRedeploy() throws Exception { Ignite ignite = startGrid(getTestIgniteInstanceName()); @@ -255,6 +262,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings({"BusyWait"}) + @Test public void testDeployOnTwoNodes() throws Exception { Ignite ignite1 = startGrid(getTestIgniteInstanceName() + '1'); Ignite ignite2 = startGrid(getTestIgniteInstanceName() + '2'); @@ -297,6 +305,7 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployEvents() throws Exception { Ignite ignite = startGrid(getTestIgniteInstanceName()); @@ -540,4 +549,4 @@ public class GridDeploymentSelfTest extends GridCommonAbstractTest { return undepCnt; } } -} \ 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/GridDiscoveryEventSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java index 2ab4b3d..450480d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoveryEventSelfTest.java @@ -40,6 +40,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -49,6 +52,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; /** * Tests discovery event topology snapshots. */ +@RunWith(JUnit4.class) public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -94,6 +98,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinSequenceEvents() throws Exception { try { Ignite g0 = startGrid(0); @@ -156,6 +161,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLeaveSequenceEvents() throws Exception { try { Ignite g0 = startGrid(0); @@ -224,6 +230,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMixedSequenceEvents() throws Exception { try { Ignite g0 = startGrid(0); @@ -343,6 +350,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentJoinEvents() throws Exception { try { Ignite g0 = startGrid(0); @@ -397,6 +405,7 @@ public class GridDiscoveryEventSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDaemonNodeJoin() throws Exception { try { startGridsMultiThreaded(3); @@ -436,4 +445,4 @@ public class GridDiscoveryEventSelfTest 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/GridDiscoverySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java index 67ab438..ea35014 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridDiscoverySelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MINUTES; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -55,6 +58,7 @@ import static org.apache.ignite.lang.IgniteProductVersion.fromString; /** * GridDiscovery self test. */ +@RunWith(JUnit4.class) public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -101,6 +105,7 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetRemoteNodes() throws Exception { Collection<ClusterNode> nodes = ignite.cluster().forRemotes().nodes(); @@ -110,6 +115,7 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetAllNodes() throws Exception { Collection<ClusterNode> nodes = ignite.cluster().nodes(); @@ -122,6 +128,7 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetLocalNode() throws Exception { ClusterNode node = ignite.cluster().localNode(); @@ -136,6 +143,7 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPingNode() throws Exception { ClusterNode node = ignite.cluster().localNode(); @@ -149,6 +157,7 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDiscoveryListener() throws Exception { ClusterNode node = ignite.cluster().localNode(); @@ -218,6 +227,7 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { * * @throws Exception In case of any exception. */ + @Test public void testCacheNodes() throws Exception { // Validate only original node is available. GridDiscoveryManager discoMgr = ((IgniteKernal) ignite).context().discovery(); @@ -399,4 +409,4 @@ public class GridDiscoverySelfTest extends GridCommonAbstractTest { return id().hashCode(); } } -} \ No newline at end of file +}
