http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java index 9186902..53a9daa 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageCheckAllEventsSelfTest.java @@ -53,6 +53,9 @@ 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; import static org.apache.ignite.compute.ComputeJobResultPolicy.FAILOVER; import static org.apache.ignite.compute.ComputeJobResultPolicy.WAIT; @@ -80,6 +83,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; * Test event storage. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; @@ -132,6 +136,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testCheckpointEvents() throws Exception { long tstamp = startTimestamp(); @@ -158,6 +163,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testTaskUndeployEvents() throws Exception { final long tstamp = startTimestamp(); @@ -201,6 +207,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testSuccessTask() throws Exception { generateEvents(null, new GridAllEventsSuccessTestJob()).get(); @@ -228,6 +235,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testFailoverJobTask() throws Exception { startGrid(0); @@ -269,6 +277,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testFailTask() throws Exception { long tstamp = startTimestamp(); @@ -300,6 +309,7 @@ public class GridEventStorageCheckAllEventsSelfTest extends GridCommonAbstractTe /** * @throws Exception If test failed. */ + @Test public void testTimeoutTask() throws Exception { long tstamp = startTimestamp();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java index 2cf727e..8346abf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageDefaultExceptionTest.java @@ -25,11 +25,15 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi; 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; /** * Event storage tests with default no-op spi. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridEventStorageDefaultExceptionTest extends GridCommonAbstractTest { /** */ public GridEventStorageDefaultExceptionTest() { @@ -48,6 +52,7 @@ public class GridEventStorageDefaultExceptionTest extends GridCommonAbstractTes /** * @throws Exception In case of error. */ + @Test public void testLocalNodeEventStorage() throws Exception { try { grid().events().localQuery(F.<Event>alwaysTrue()); @@ -64,6 +69,7 @@ public class GridEventStorageDefaultExceptionTest extends GridCommonAbstractTes /** * @throws Exception In case of error. */ + @Test public void testRemoteNodeEventStorage() throws Exception { try { grid().events().remoteQuery(F.<Event>alwaysTrue(), 0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java index cf401c5..22f917c 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageRuntimeConfigurationSelfTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_CREATED; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -44,6 +47,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT; /** * Tests for runtime events configuration. */ +@RunWith(JUnit4.class) public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbstractTest { /** */ private int[] inclEvtTypes; @@ -61,6 +65,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testEnableWithDefaults() throws Exception { inclEvtTypes = null; @@ -95,6 +100,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testEnableWithIncludes() throws Exception { inclEvtTypes = new int[] { EVT_TASK_STARTED, EVT_TASK_FINISHED }; @@ -129,6 +135,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testDisableWithIncludes() throws Exception { inclEvtTypes = null; @@ -165,6 +172,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testEnableDisable() throws Exception { inclEvtTypes = null; @@ -188,6 +196,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testInvalidTypes() throws Exception { inclEvtTypes = new int[]{EVT_TASK_STARTED}; @@ -223,6 +232,7 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testGetters() throws Exception { inclEvtTypes = new int[]{EVT_TASK_STARTED, EVT_TASK_FINISHED, 30000}; @@ -353,4 +363,4 @@ public class GridEventStorageRuntimeConfigurationSelfTest extends GridCommonAbst return U.toIntArray(res); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java index 4f98b0c..1218598 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridEventStorageSelfTest.java @@ -39,6 +39,9 @@ import org.apache.ignite.internal.util.typedef.F; 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.EVTS_ALL_MINUS_METRIC_UPDATE; import static org.apache.ignite.events.EventType.EVTS_JOB_EXECUTION; @@ -56,6 +59,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_STARTED; * serialized form. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** First grid. */ private static Ignite ignite1; @@ -82,6 +86,7 @@ public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testAddRemoveGlobalListener() throws Exception { IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() { @Override public boolean apply(Event evt) { @@ -99,6 +104,7 @@ public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testAddRemoveDiscoListener() throws Exception { IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() { @Override public boolean apply(Event evt) { @@ -117,6 +123,7 @@ public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testLocalNodeEventStorage() throws Exception { TestEventListener lsnr = new TestEventListener(); @@ -164,6 +171,7 @@ public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testRemoteNodeEventStorage() throws Exception { IgnitePredicate<Event> filter = new TestEventFilter(); @@ -180,6 +188,7 @@ public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testRemoteAndLocalNodeEventStorage() throws Exception { IgnitePredicate<Event> filter = new TestEventFilter(); @@ -211,6 +220,7 @@ public class GridEventStorageSelfTest extends GridCommonAbstractTest { /** * @throws Exception In case of error. */ + @Test public void testGridInternalEvents() throws Exception { IgnitePredicate<Event> lsnr = new IgnitePredicate<Event>() { @Override public boolean apply(Event evt) { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java index 79dc81a..e643e27 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailFastNodeFailureDetectionSelfTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -38,6 +41,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; /** * Fail fast test. */ +@RunWith(JUnit4.class) public class GridFailFastNodeFailureDetectionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -69,6 +73,7 @@ public class GridFailFastNodeFailureDetectionSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testFailFast() throws Exception { startGridsMultiThreaded(5); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java index 9446db6..a8437f9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailedInputParametersSelfTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.U; 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.EVTS_ALL; @@ -30,6 +33,7 @@ import static org.apache.ignite.events.EventType.EVTS_ALL; * Test for invalid input parameters. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite; @@ -47,6 +51,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testAddEventLocalListener() throws Exception { try { ignite.events().localListen(null, EVTS_ALL); @@ -61,6 +66,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testRemoveEventLocalListener() throws Exception { try { ignite.events().stopLocalListen(null); @@ -75,6 +81,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testAddDiscoveryListener() throws Exception { try { ignite.events().localListen(null, EVTS_ALL); @@ -89,6 +96,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testRemoveDiscoveryListener() throws Exception { try { ignite.events().stopLocalListen(null); @@ -103,6 +111,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testGetNode() throws Exception { try { ignite.cluster().node(null); @@ -117,6 +126,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testPingNode() throws Exception { try { ignite.cluster().pingNode(null); @@ -131,6 +141,7 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { /** * @throws Exception Thrown in case of any errors. */ + @Test public void testDeployTask() throws Exception { try { ignite.compute().localDeployTask(null, null); @@ -153,4 +164,4 @@ public class GridFailedInputParametersSelfTest extends GridCommonAbstractTest { // Check for exceptions. ignite.compute().localDeployTask(GridTestTask.class, U.detectClassLoader(GridTestTask.class)); } -} \ 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/GridFailoverCustomTopologySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java index 86bca80..a0485c2 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverCustomTopologySelfTest.java @@ -40,11 +40,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; /** * Test failover and custom topology. Topology returns local node if remote node fails. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest { /** */ private final AtomicInteger failCnt = new AtomicInteger(0); @@ -81,6 +85,7 @@ public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings({"WaitNotInLoop", "UnconditionalWait"}) + @Test public void testFailoverTopology() throws Exception { try { Ignite ignite1 = startGrid(1); @@ -192,4 +197,4 @@ public class GridFailoverCustomTopologySelfTest extends GridCommonAbstractTest { return results.get(0).getData(); } } -} \ 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/GridFailoverSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java index 5ed2245..d10e9c5 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverSelfTest.java @@ -40,11 +40,15 @@ import org.apache.ignite.resources.TaskSessionResource; 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; /** * Failover tests. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverSelfTest extends GridCommonAbstractTest { /** Initial node that job has been mapped to. */ private static final AtomicReference<ClusterNode> nodeRef = new AtomicReference<>(null); @@ -66,6 +70,7 @@ public class GridFailoverSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJobFail() throws Exception { try { Ignite ignite1 = startGrid(1); @@ -160,4 +165,4 @@ public class GridFailoverSelfTest extends GridCommonAbstractTest { return results.get(0).getData(); } } -} \ 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/GridFailoverTaskWithPredicateSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java index 84f31cb..6074efc 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTaskWithPredicateSelfTest.java @@ -43,11 +43,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; /** * Test failover of a task with Node filter predicate. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTest { /** First node's name. */ private static final String NODE1 = "NODE1"; @@ -98,6 +102,7 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes * * @throws Exception If failed. */ + @Test public void testJobNotFailedOver() throws Exception { failed.set(false); routed.set(false); @@ -129,6 +134,7 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes * * @throws Exception If failed. */ + @Test public void testJobFailedOver() throws Exception { failed.set(false); routed.set(false); @@ -166,6 +172,7 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes * * @throws Exception If error happens. */ + @Test public void testJobNotFailedOverWithStaticProjection() throws Exception { failed.set(false); routed.set(false); @@ -255,4 +262,4 @@ public class GridFailoverTaskWithPredicateSelfTest extends GridCommonAbstractTes } } -} \ 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/GridFailoverTopologySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java index dd78768..e3fdd1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridFailoverTopologySelfTest.java @@ -37,11 +37,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; /** * Test failover and topology. It don't pick local node if it has been excluded from topology. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridFailoverTopologySelfTest extends GridCommonAbstractTest { /** */ private final AtomicBoolean failed = new AtomicBoolean(false); @@ -92,6 +96,7 @@ public class GridFailoverTopologySelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testFailoverTopology() throws Exception { try { Ignite ignite1 = startGrid(1); @@ -164,4 +169,4 @@ public class GridFailoverTopologySelfTest extends GridCommonAbstractTest { return results.get(0).getData(); } } -} \ 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/GridGetOrStartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java index 74d50cf..402240e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridGetOrStartSelfTest.java @@ -20,12 +20,16 @@ package org.apache.ignite.internal; import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.testframework.junits.common.*; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * The GirdGetOrStartSelfTest tests get or start semantics. See IGNITE-2941 */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridGetOrStartSelfTest extends GridCommonAbstractTest { /** * Default constructor. @@ -37,6 +41,7 @@ public class GridGetOrStartSelfTest extends GridCommonAbstractTest { /** * Tests default Ignite instance */ + @Test public void testDefaultIgniteInstanceGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration(null); try(Ignite ignite = Ignition.getOrStart(cfg)) { @@ -54,6 +59,7 @@ public class GridGetOrStartSelfTest extends GridCommonAbstractTest { /** * Tests named Ignite instance */ + @Test public void testNamedIgniteInstanceGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration("test"); try(Ignite ignite = Ignition.getOrStart(cfg)) { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java index 281c360..b38e5fd 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridHomePathSelfTest.java @@ -22,12 +22,16 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.X; 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_HOME; /** * */ +@RunWith(JUnit4.class) public class GridHomePathSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -41,6 +45,7 @@ public class GridHomePathSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testHomeOverride() throws Exception { try { startGrid(0); @@ -73,4 +78,4 @@ public class GridHomePathSelfTest 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/GridJobCheckpointCleanupSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java index eca7ebe..b016a2f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCheckpointCleanupSelfTest.java @@ -38,10 +38,14 @@ import org.apache.ignite.spi.checkpoint.CheckpointListener; import org.apache.ignite.spi.checkpoint.CheckpointSpi; 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 for checkpoint cleanup. */ +@RunWith(JUnit4.class) public class GridJobCheckpointCleanupSelfTest extends GridCommonAbstractTest { /** Number of currently alive checkpoints. */ private final AtomicInteger cntr = new AtomicInteger(); @@ -64,6 +68,7 @@ public class GridJobCheckpointCleanupSelfTest extends GridCommonAbstractTest { * * @throws Exception if failed. */ + @Test public void testCheckpointCleanup() throws Exception { try { checkpointSpi = new TestCheckpointSpi("task-checkpoints", cntr); @@ -169,4 +174,4 @@ public class GridJobCheckpointCleanupSelfTest 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/GridJobCollisionCancelSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java index 80b5599..58f2402 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobCollisionCancelSelfTest.java @@ -45,12 +45,16 @@ 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; /** * Job collision cancel test. */ @SuppressWarnings( {"PublicInnerClass"}) @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobCollisionCancelSelfTest extends GridCommonAbstractTest { /** */ private static final Object mux = new Object(); @@ -79,6 +83,7 @@ public class GridJobCollisionCancelSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings( {"AssignmentToCatchBlockParameter"}) + @Test public void testCancel() throws Exception { Ignite ignite = G.ignite(getTestIgniteInstanceName()); @@ -290,4 +295,4 @@ public class GridJobCollisionCancelSelfTest 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/GridJobContextSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java index 42b1ba0..87504ea 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobContextSelfTest.java @@ -34,15 +34,20 @@ import org.apache.ignite.resources.IgniteInstanceResource; import org.apache.ignite.resources.JobContextResource; 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; /** * Job context test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobContextSelfTest extends GridCommonAbstractTest { /** * @throws Exception If anything failed. */ + @Test public void testJobContext() throws Exception { Ignite ignite = startGrid(1); @@ -128,4 +133,4 @@ public class GridJobContextSelfTest 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/GridJobMasterLeaveAwareSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java index a8be541..bc2e33a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobMasterLeaveAwareSelfTest.java @@ -58,6 +58,9 @@ 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.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.CacheMode.PARTITIONED; @@ -67,6 +70,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; * interface. */ @GridCommonTest(group = "Task Session") +@RunWith(JUnit4.class) public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** Total grid count within the cloud. */ private static final int GRID_CNT = 2; @@ -145,6 +149,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testLocalJobOnMaster() throws Exception { invokeLatch = new CountDownLatch(1); jobLatch = new CountDownLatch(1); @@ -181,6 +186,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMasterStoppedNormally() throws Exception { // Start grids. for (int i = 0; i < GRID_CNT; i++) @@ -206,6 +212,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testMasterStoppedAbruptly() throws Exception { // Start grids. for (int i = 0; i < GRID_CNT; i++) @@ -233,6 +240,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testCannotSendJobExecuteResponse() throws Exception { awaitMasterLeaveCallback = false; @@ -271,6 +279,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testApply1() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup grid) { @@ -282,6 +291,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testApply2() throws Exception { testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup grid) { @@ -293,6 +303,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testApply3() throws Exception { testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup grid) { @@ -314,6 +325,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRun1() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -325,6 +337,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRun2() throws Exception { testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -336,6 +349,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCall1() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -347,6 +361,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCall2() throws Exception { testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -358,6 +373,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCall3() throws Exception { testMasterLeaveAwareCallback(2, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -379,6 +395,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBroadcast1() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -390,6 +407,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBroadcast2() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -401,6 +419,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBroadcast3() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -412,6 +431,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -427,6 +447,7 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { testMasterLeaveAwareCallback(1, new CX1<ClusterGroup, IgniteFuture<?>>() { @Override public IgniteFuture<?> applyx(ClusterGroup prj) { @@ -767,4 +788,4 @@ public class GridJobMasterLeaveAwareSelfTest extends GridCommonAbstractTest { U.await(respLatch); } } -} \ 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/GridJobServicesAddNodeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java index aab33db..38b9bb4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobServicesAddNodeTest.java @@ -38,11 +38,15 @@ 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; /** * Tests multiple parallel jobs execution, accessing services(), while starting new nodes. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobServicesAddNodeTest extends GridCommonAbstractTest { /** */ private static final int LOG_MOD = 100; @@ -83,6 +87,7 @@ public class GridJobServicesAddNodeTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testServiceDescriptorsJob() throws Exception { final int tasks = 5000; final int threads = 10; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java index 04f7bfc..f2879ef 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingSelfTest.java @@ -50,12 +50,16 @@ import org.apache.ignite.testframework.config.GridTestProperties; 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; /** * Job stealing test. */ @SuppressWarnings("unchecked") @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobStealingSelfTest extends GridCommonAbstractTest { /** Task execution timeout in milliseconds. */ private static final int TASK_EXEC_TIMEOUT_MS = 50000; @@ -96,6 +100,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobs() throws IgniteCheckedException { executeAsync(ignite1.compute(), new JobStealingSingleNodeTask(2), null).get(TASK_EXEC_TIMEOUT_MS); @@ -110,6 +115,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobsNullPredicate() throws IgniteCheckedException { executeAsync(ignite1.compute(), new JobStealingSingleNodeTask(2), null).get(TASK_EXEC_TIMEOUT_MS); @@ -124,6 +130,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobsTaskNameNullPredicate() throws IgniteCheckedException { executeAsync(ignite1.compute(), JobStealingSingleNodeTask.class.getName(), null).get(TASK_EXEC_TIMEOUT_MS); @@ -138,6 +145,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobsPartiallyNullPredicate() throws IgniteCheckedException { IgnitePredicate<ClusterNode> topPred = new IgnitePredicate<ClusterNode>() { @Override public boolean apply(ClusterNode e) { @@ -158,6 +166,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testProjectionPredicate() throws Exception { final Ignite ignite3 = startGrid(3); @@ -181,6 +190,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testProjectionPredicateInternalStealing() throws Exception { final Ignite ignite3 = startGrid(3); @@ -209,6 +219,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSingleNodeTopology() throws Exception { IgnitePredicate<ClusterNode> p = new IgnitePredicate<ClusterNode>() { @Override public boolean apply(ClusterNode e) { @@ -229,6 +240,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSingleNodeProjection() throws Exception { ClusterGroup prj = ignite1.cluster().forNodeIds(Collections.singleton(ignite1.cluster().localNode().id())); @@ -244,6 +256,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSingleNodeProjectionNullPredicate() throws Exception { ClusterGroup prj = ignite1.cluster().forNodeIds(Collections.singleton(ignite1.cluster().localNode().id())); @@ -260,6 +273,7 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testProjectionPredicateDifferentClassLoaders() throws Exception { final Ignite ignite3 = startGrid(3); @@ -447,4 +461,4 @@ public class GridJobStealingSelfTest extends GridCommonAbstractTest { return ignite.cluster().localNode().id(); } } -} \ 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/GridJobStealingZeroActiveJobsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java index 31015ce..aee0e48 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobStealingZeroActiveJobsSelfTest.java @@ -39,11 +39,15 @@ import org.apache.ignite.spi.failover.jobstealing.JobStealingFailoverSpi; 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; /** * Job stealing test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridJobStealingZeroActiveJobsSelfTest extends GridCommonAbstractTest { /** */ private static Ignite ignite1; @@ -75,6 +79,7 @@ public class GridJobStealingZeroActiveJobsSelfTest extends GridCommonAbstractTes * * @throws IgniteCheckedException If test failed. */ + @Test public void testTwoJobs() throws IgniteCheckedException { ignite1.compute().execute(JobStealingTask.class, null); } @@ -176,4 +181,4 @@ public class GridJobStealingZeroActiveJobsSelfTest extends GridCommonAbstractTes return ignite.name(); } } -} \ 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/GridJobSubjectIdSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java index 95a7926..354354b 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridJobSubjectIdSelfTest.java @@ -36,12 +36,16 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.resources.TaskSessionResource; 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.internal.processors.task.GridTaskThreadContextKey.TC_SUBJ_ID; /** * Test job subject ID propagation. */ +@RunWith(JUnit4.class) public class GridJobSubjectIdSelfTest extends GridCommonAbstractTest { /** Job subject ID. */ private static volatile UUID taskSubjId; @@ -85,6 +89,7 @@ public class GridJobSubjectIdSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testJobSubjectId() throws Exception { node2.events().localListen(new IgnitePredicate<Event>() { @Override public boolean apply(Event evt) { @@ -110,6 +115,7 @@ public class GridJobSubjectIdSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testModifiedSubjectId() throws Exception { node1.events().localListen(new IgnitePredicate<Event>() { @Override public boolean apply(Event evt) { @@ -197,4 +203,4 @@ public class GridJobSubjectIdSelfTest 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/GridKernalConcurrentAccessStopSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java index 2db34e0..d797c1a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridKernalConcurrentAccessStopSelfTest.java @@ -20,6 +20,9 @@ package org.apache.ignite.internal; import org.apache.ignite.events.Event; import org.apache.ignite.lang.IgnitePredicate; 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.events.EventType.EVT_NODE_FAILED; import static org.apache.ignite.events.EventType.EVT_NODE_JOINED; @@ -28,6 +31,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; /** * Tests kernal stop while it is being accessed from asynchronous even listener. */ +@RunWith(JUnit4.class) public class GridKernalConcurrentAccessStopSelfTest extends GridCommonAbstractTest { /** Grid count. */ private static final int GRIDS = 2; @@ -41,6 +45,7 @@ public class GridKernalConcurrentAccessStopSelfTest extends GridCommonAbstractT /** * */ + @Test public void testConcurrentAccess() { for (int i = 0; i < GRIDS; i++) { grid(i).events().localListen(new IgnitePredicate<Event>() { @@ -56,4 +61,4 @@ public class GridKernalConcurrentAccessStopSelfTest extends GridCommonAbstractT }, EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_NODE_JOINED); } } -} \ 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/GridLifecycleBeanSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java index 7fe0924..ed14ecf 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLifecycleBeanSelfTest.java @@ -35,6 +35,9 @@ import org.apache.ignite.lifecycle.LifecycleEventType; import org.apache.ignite.resources.IgniteInstanceResource; 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.lifecycle.LifecycleEventType.AFTER_NODE_START; import static org.apache.ignite.lifecycle.LifecycleEventType.AFTER_NODE_STOP; @@ -45,6 +48,7 @@ import static org.apache.ignite.lifecycle.LifecycleEventType.BEFORE_NODE_STOP; * Lifecycle bean test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** */ private LifeCycleBaseBean bean; @@ -61,6 +65,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetIgnite() throws Exception { final AtomicBoolean done = new AtomicBoolean(); @@ -96,6 +101,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoErrors() throws Exception { bean = new LifeCycleBaseBean(); @@ -125,6 +131,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGridErrorBeforeStart() throws Exception { checkBeforeStart(true); } @@ -132,6 +139,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOtherErrorBeforeStart() throws Exception { checkBeforeStart(false); } @@ -139,6 +147,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGridErrorAfterStart() throws Exception { checkAfterStart(true); } @@ -146,6 +155,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOtherErrorAfterStart() throws Exception { checkAfterStart(false); } @@ -207,6 +217,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGridErrorBeforeStop() throws Exception { checkOnStop(BEFORE_NODE_STOP, true); @@ -219,6 +230,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOtherErrorBeforeStop() throws Exception { checkOnStop(BEFORE_NODE_STOP, false); @@ -231,6 +243,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGridErrorAfterStop() throws Exception { checkOnStop(AFTER_NODE_STOP, true); @@ -243,6 +256,7 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOtherErrorAfterStop() throws Exception { checkOnStop(AFTER_NODE_STOP, false); @@ -356,4 +370,4 @@ public class GridLifecycleBeanSelfTest extends GridCommonAbstractTest { super.onLifecycleEvent(evt); } } -} \ 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/GridListenActorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java index efa25a7..04b9e42 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.PA; import org.apache.ignite.messaging.MessagingListenActor; 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; /** * Tests for {@link org.apache.ignite.messaging.MessagingListenActor}. */ +@RunWith(JUnit4.class) public class GridListenActorSelfTest extends GridCommonAbstractTest { /** */ private static final int MSG_QTY = 10; @@ -52,6 +56,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { * * @throws Exception Thrown if failed. */ + @Test public void testBasicFlow() throws Exception { final AtomicInteger cnt = new AtomicInteger(0); @@ -85,6 +90,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testImmediateStop() throws Exception { doSendReceive(MSG_QTY, 1); } @@ -92,6 +98,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReceiveAll() throws Exception { doSendReceive(MSG_QTY, MSG_QTY); } @@ -101,6 +108,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testRespondToRemote() throws Exception { startGrid(1); @@ -144,6 +152,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPingPong() throws Exception { final AtomicInteger pingCnt = new AtomicInteger(); final AtomicInteger pongCnt = new AtomicInteger(); @@ -219,4 +228,4 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest { assert cnt.intValue() == rcv; } -} \ 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/GridLocalEventListenerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java index 4337178..cd1be31 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridLocalEventListenerSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.events.Event; import org.apache.ignite.events.EventType; import org.apache.ignite.lang.IgnitePredicate; 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 event listeners are picked by started node. */ +@RunWith(JUnit4.class) public class GridLocalEventListenerSelfTest extends GridCommonAbstractTest { /** Whether event fired. */ private final CountDownLatch fired = new CountDownLatch(1); @@ -67,9 +71,10 @@ public class GridLocalEventListenerSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testListener() throws Exception { startGrids(2); assert fired.await(5000, TimeUnit.MILLISECONDS); } -} \ 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/GridMBeansTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java index 1c39982..48c5cb0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMBeansTest.java @@ -23,10 +23,14 @@ import org.apache.ignite.internal.util.IgniteUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import javax.management.ObjectName; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for the standard JMX beans registered by the kernal. */ +@RunWith(JUnit4.class) public class GridMBeansTest extends GridCommonAbstractTest { /** Executor name for setExecutorConfiguration */ private static final String CUSTOM_EXECUTOR_0 = "Custom executor 0"; @@ -54,6 +58,7 @@ public class GridMBeansTest extends GridCommonAbstractTest { } /** Check that kernal bean is available */ + @Test public void testKernalBeans() throws Exception { checkBean("Kernal", "IgniteKernal", "InstanceName", grid().name()); checkBean("Kernal", "ClusterMetricsMXBeanImpl", "TotalServerNodes", 1); @@ -61,6 +66,7 @@ public class GridMBeansTest extends GridCommonAbstractTest { } /** Check that kernal bean is available */ + @Test public void testExecutorBeans() throws Exception { // standard executors checkBean("Thread Pools", "GridExecutionExecutor", "Terminated", false); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java index 22f0fa7..6102c36 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleJobsSelfTest.java @@ -36,6 +36,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.cache.CacheMode.PARTITIONED; @@ -43,6 +46,7 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED; * Tests multiple parallel jobs execution. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { /** */ private static final int LOG_MOD = 100; @@ -99,6 +103,7 @@ public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testNotAffinityJobs() throws Exception { /* =========== Test properties =========== */ int jobsNum = 5000; @@ -110,6 +115,7 @@ public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testAffinityJobs() throws Exception { /* =========== Test properties =========== */ int jobsNum = 5000; @@ -223,4 +229,4 @@ public class GridMultipleJobsSelfTest extends GridCommonAbstractTest { 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/GridMultipleSpisSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java index edadcfe..d894c0e 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleSpisSelfTest.java @@ -42,11 +42,15 @@ import org.apache.ignite.spi.failover.always.AlwaysFailoverSpi; import org.apache.ignite.spi.loadbalancing.roundrobin.RoundRobinLoadBalancingSpi; 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; /** * Multiple SPIs test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultipleSpisSelfTest extends GridCommonAbstractTest { /** */ private boolean isTaskFailoverCalled; @@ -109,6 +113,7 @@ public class GridMultipleSpisSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFailoverTask() throws Exception { // Start local and remote grids. Ignite ignite1 = startGrid(1); @@ -310,4 +315,4 @@ public class GridMultipleSpisSelfTest extends GridCommonAbstractTest { return 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/GridMultipleVersionsDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java index dc5c16d..33bfb22 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultipleVersionsDeploymentSelfTest.java @@ -44,6 +44,9 @@ import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.GridTestClassLoader; 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 java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; @@ -52,6 +55,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; * */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTest { /** Excluded classes. */ private static final String[] EXCLUDE_CLASSES = new String[] { @@ -101,6 +105,7 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testMultipleVersionsLocalDeploy() throws Exception { try { Ignite ignite = startGrid(1); @@ -160,6 +165,7 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe * @throws Exception If test failed. */ @SuppressWarnings("unchecked") + @Test public void testMultipleVersionsP2PDeploy() throws Exception { try { Ignite g1 = startGrid(1); @@ -317,4 +323,4 @@ public class GridMultipleVersionsDeploymentSelfTest extends GridCommonAbstractTe } } } -} \ 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/GridMultithreadedJobStealingSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java index 605cb3d..af49428 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridMultithreadedJobStealingSelfTest.java @@ -47,11 +47,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; /** * Multithreaded job stealing test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridMultithreadedJobStealingSelfTest extends GridCommonAbstractTest { /** */ private Ignite ignite; @@ -81,6 +85,7 @@ public class GridMultithreadedJobStealingSelfTest extends GridCommonAbstractTest * * @throws Exception If test failed. */ + @Test public void testTwoJobsMultithreaded() throws Exception { final AtomicReference<Exception> fail = new AtomicReference<>(null); @@ -136,6 +141,7 @@ public class GridMultithreadedJobStealingSelfTest extends GridCommonAbstractTest * * @throws Exception If test failed. */ + @Test public void testJoinedNodeCanStealJobs() throws Exception { final AtomicReference<Exception> fail = new AtomicReference<>(null); @@ -341,4 +347,4 @@ public class GridMultithreadedJobStealingSelfTest extends GridCommonAbstractTest '}'; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java index 7a07def..c3a71f1 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeFilterSelfTest.java @@ -23,11 +23,15 @@ import org.apache.ignite.Ignite; import org.apache.ignite.cluster.ClusterNode; 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; /** * Node filter test. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridNodeFilterSelfTest extends GridCommonAbstractTest { /** Grid instance. */ private Ignite ignite; @@ -51,6 +55,7 @@ public class GridNodeFilterSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSynchronousExecute() throws Exception { UUID nodeId = ignite.cluster().localNode().id(); @@ -66,4 +71,4 @@ public class GridNodeFilterSelfTest extends GridCommonAbstractTest { assert rmtNodes.size() == 1; assert rmtNodes.iterator().next().id().equals(rmtNodeId); } -} \ 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/GridNodeLocalSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java index 8d8b59f..07b4aa9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeLocalSelfTest.java @@ -26,11 +26,15 @@ import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.mxbean.IgniteMXBean; 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; /** * This test will test node local storage. */ @GridCommonTest(group = "Kernal Self") +@RunWith(JUnit4.class) public class GridNodeLocalSelfTest extends GridCommonAbstractTest { /** Create test. */ public GridNodeLocalSelfTest() { @@ -42,6 +46,7 @@ public class GridNodeLocalSelfTest extends GridCommonAbstractTest { * * @throws Exception If test failed. */ + @Test public void testNodeLocal() throws Exception { Ignite g = G.ignite(getTestIgniteInstanceName()); @@ -70,6 +75,7 @@ public class GridNodeLocalSelfTest extends GridCommonAbstractTest { * * @throws Exception if test failed. */ + @Test public void testClearNodeLocalMap() throws Exception { final String key = "key"; final String value = "value"; @@ -86,4 +92,4 @@ public class GridNodeLocalSelfTest extends GridCommonAbstractTest { igniteMXBean.clearNodeLocalMap(); assert nodeLocalMap.isEmpty() : "Not empty node local map"; } -} \ 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/GridNodeMetricsLogSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java index 7b76b07..8d9575f 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeMetricsLogSelfTest.java @@ -29,12 +29,16 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.testframework.GridStringLogger; 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; /** * Check logging local node metrics */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "Kernal") +@RunWith(JUnit4.class) public class GridNodeMetricsLogSelfTest extends GridCommonAbstractTest { /** Executor name for setExecutorConfiguration */ private static final String CUSTOM_EXECUTOR_0 = "Custom executor 0"; @@ -76,6 +80,7 @@ public class GridNodeMetricsLogSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeMetricsLog() throws Exception { IgniteCache<Integer, String> cache1 = grid(0).createCache("TestCache1"); IgniteCache<Integer, String> cache2 = grid(1).createCache("TestCache2"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java index 78385a1..cdff29a 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNodeVisorAttributesSelfTest.java @@ -21,10 +21,14 @@ import java.util.Map; import org.apache.ignite.Ignite; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Ensures that system properties required by Visor are always passed to node attributes. */ +@RunWith(JUnit4.class) public class GridNodeVisorAttributesSelfTest extends GridCommonAbstractTest { /** System properties required by Visor. */ private static final String[] SYSTEM_PROPS = new String[] { @@ -82,6 +86,7 @@ public class GridNodeVisorAttributesSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testIncludeNull() throws Exception { inclProps = null; @@ -94,6 +99,7 @@ public class GridNodeVisorAttributesSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("ZeroLengthArrayAllocation") + @Test public void testIncludeEmpty() throws Exception { inclProps = new String[] {}; @@ -105,9 +111,10 @@ public class GridNodeVisorAttributesSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testIncludeNonEmpty() throws Exception { inclProps = new String[] {"prop1", "prop2"}; startGridAndCheck(); } -} \ 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/GridNonHistoryMetricsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java index 2fcbf49..b224c18 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridNonHistoryMetricsSelfTest.java @@ -35,12 +35,16 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.resources.LoggerResource; 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.events.EventType.EVT_NODE_METRICS_UPDATED; /** * */ +@RunWith(JUnit4.class) public class GridNonHistoryMetricsSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { @@ -66,6 +70,7 @@ public class GridNonHistoryMetricsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleTaskMetrics() throws Exception { final Ignite ignite = grid(); @@ -126,4 +131,4 @@ public class GridNonHistoryMetricsSelfTest extends GridCommonAbstractTest { return results; } } -} \ 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/GridProjectionForCachesSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java index 3548234..232caf6 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionForCachesSelfTest.java @@ -36,12 +36,16 @@ 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.jetbrains.annotations.NotNull; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.cache.CacheMode.PARTITIONED; /** * Tests for {@link ClusterGroup#forCacheNodes(String)} method. */ +@RunWith(JUnit4.class) public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -126,6 +130,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjectionForDefaultCache() throws Exception { final ClusterGroup prj = ignite.cluster().forCacheNodes(DEFAULT_CACHE_NAME); @@ -149,6 +154,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjectionForNamedCache() throws Exception { final ClusterGroup prj = ignite.cluster().forCacheNodes(CACHE_NAME); @@ -171,6 +177,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjectionForDataCaches() throws Exception { ClusterGroup prj = ignite.cluster().forDataNodes(DEFAULT_CACHE_NAME); @@ -182,6 +189,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjectionForClientCaches() throws Exception { ClusterGroup prj = ignite.cluster().forClientNodes(CACHE_NAME); @@ -193,6 +201,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjectionForWrongCacheName() throws Exception { ClusterGroup prj = ignite.cluster().forCacheNodes("wrong"); @@ -203,6 +212,7 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testProjections() throws Exception { ClusterNode locNode = ignite.cluster().localNode(); UUID locId = locNode.id(); @@ -320,4 +330,4 @@ public class GridProjectionForCachesSelfTest extends GridCommonAbstractTest { return false; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java index d9cc732..e7a0659 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionLocalJobMultipleArgumentsSelfTest.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 for methods that run job locally with multiple arguments. */ +@RunWith(JUnit4.class) public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -84,6 +88,7 @@ public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testAffinityCall() throws Exception { Collection<Integer> res = new ArrayList<>(); @@ -104,6 +109,7 @@ public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testAffinityRun() throws Exception { for (int i : F.asList(1, 2, 3)) { grid().compute().affinityRun(DEFAULT_CACHE_NAME, i, new IgniteRunnable() { @@ -122,6 +128,7 @@ public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testCall() throws Exception { Collection<Integer> res = grid().compute().apply(new C1<Integer, Integer>() { @Override public Integer apply(Integer arg) { @@ -138,6 +145,7 @@ public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonA /** * @throws Exception If failed. */ + @Test public void testCallWithProducer() throws Exception { Collection<Integer> args = Arrays.asList(1, 2, 3); @@ -152,4 +160,4 @@ public class GridProjectionLocalJobMultipleArgumentsSelfTest extends GridCommonA assertEquals(36, F.sumInt(res)); assertEquals(3, ids.size()); } -} \ 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/GridReduceSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java index 827e2a2..4580261 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/GridReduceSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.lang.IgniteFuture; import org.apache.ignite.resources.LoggerResource; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test reduce with long operations. */ +@RunWith(JUnit4.class) public class GridReduceSelfTest extends GridCommonAbstractTest { /** Number of nodes in the grid. */ private static final int GRID_CNT = 3; @@ -37,6 +41,7 @@ public class GridReduceSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReduce() throws Exception { startGrids(GRID_CNT); @@ -79,6 +84,7 @@ public class GridReduceSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReduceAsync() throws Exception { startGrids(GRID_CNT); @@ -187,4 +193,4 @@ public class GridReduceSelfTest extends GridCommonAbstractTest { } } } -} \ No newline at end of file +}
