http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java index 7bea716..2dcd6ba 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiConfigSelfTest.java @@ -20,6 +20,9 @@ package org.apache.ignite.spi.communication.tcp; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractConfigTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.testframework.GridTestUtils.getFreeCommPort; @@ -27,10 +30,12 @@ import static org.apache.ignite.testframework.GridTestUtils.getFreeCommPort; * TCP communication SPI config test. */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiConfigSelfTest extends GridSpiAbstractConfigTest<TcpCommunicationSpi> { /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new TcpCommunicationSpi(), "localPort", 1023); checkNegativeSpiProperty(new TcpCommunicationSpi(), "localPort", 65636); @@ -55,6 +60,7 @@ public class GridTcpCommunicationSpiConfigSelfTest extends GridSpiAbstractConfig /** * @throws Exception If failed. */ + @Test public void testLocalPortRange() throws Exception { IgniteConfiguration cfg = getConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java index 0585b3d..21aec78 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiLanLoadTest.java @@ -41,10 +41,14 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class for multithreaded {@link TcpCommunicationSpi} test. */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiLanLoadTest extends GridSpiAbstractTest<TcpCommunicationSpi> { /** Connection idle timeout */ public static final int IDLE_CONN_TIMEOUT = 2000; @@ -138,6 +142,7 @@ public class GridTcpCommunicationSpiLanLoadTest extends GridSpiAbstractTest<TcpC /** * @throws Exception If failed. */ + @Test public void testRunReceiver() throws Exception { info(">>> Starting receiving SPI. <<<"); @@ -153,6 +158,7 @@ public class GridTcpCommunicationSpiLanLoadTest extends GridSpiAbstractTest<TcpC /** * @throws Exception If failed. */ + @Test public void testRunSender() throws Exception { reject = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java index 86a1109..7df40f8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiMultithreadedSelfTest.java @@ -61,12 +61,16 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS; /** * Class for multithreaded {@link TcpCommunicationSpi} test. */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstractTest<TcpCommunicationSpi> { /** Connection idle timeout */ public static final int IDLE_CONN_TIMEOUT = 2000; @@ -192,6 +196,7 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac /** * @throws Exception If failed. */ + @Test public void testSendToRandomNodesMultithreaded() throws Exception { info(">>> Starting send to random nodes multithreaded test. <<<"); @@ -277,6 +282,7 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac /** * @throws Exception If failed. */ + @Test public void testFlowSend() throws Exception { reject = true; @@ -387,6 +393,7 @@ public class GridTcpCommunicationSpiMultithreadedSelfTest extends GridSpiAbstrac /** * @throws Exception If failed. */ + @Test public void testPassThroughPerformance() throws Exception { reject = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java index 16ad2c8..22d1075 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryAckSelfTest.java @@ -50,11 +50,15 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationSpi> extends GridSpiAbstractTest<T> { /** */ private static final Collection<IgniteTestResources> spiRsrcs = new ArrayList<>(); @@ -121,6 +125,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS /** * @throws Exception If failed. */ + @Test public void testAckOnIdle() throws Exception { checkAck(10, 2000, 9); } @@ -128,6 +133,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS /** * @throws Exception If failed. */ + @Test public void testAckOnCount() throws Exception { checkAck(10, 60_000, 10); } @@ -238,6 +244,7 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS /** * @throws Exception If failed. */ + @Test public void testQueueOverflow() throws Exception { for (int i = 0; i < 3; i++) { try { @@ -498,4 +505,4 @@ public class GridTcpCommunicationSpiRecoveryAckSelfTest<T extends CommunicationS nodes.clear(); spiRsrcs.clear(); } -} \ 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/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java index b1aa119..6dfbbf0 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest.java @@ -18,10 +18,14 @@ package org.apache.ignite.spi.communication.tcp; import org.apache.ignite.configuration.IgniteConfiguration; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest extends GridTcpCommunicationSpiRecoverySelfTest { /** {@inheritDoc} */ @Override protected TcpCommunicationSpi getSpi(int idx) { @@ -46,10 +50,11 @@ public class GridTcpCommunicationSpiRecoveryFailureDetectionSelfTest extends Gri /** * @throws Exception if failed. */ + @Test public void testFailureDetectionEnabled() throws Exception { for (TcpCommunicationSpi spi: spis) { assertTrue(spi.failureDetectionTimeoutEnabled()); assertTrue(spi.failureDetectionTimeout() == IgniteConfiguration.DFLT_FAILURE_DETECTION_TIMEOUT); } } -} \ 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/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java index 27f7fa3..3232ba3 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiRecoverySelfTest.java @@ -55,12 +55,16 @@ import org.apache.ignite.testframework.junits.IgniteMock; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @SuppressWarnings("unchecked") @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi> extends GridSpiAbstractTest<T> { /** */ private static final Collection<IgniteTestResources> spiRsrcs = new ArrayList<>(); @@ -197,6 +201,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi> /** * @throws Exception If failed. */ + @Test public void testBlockListener() throws Exception { // Test listener throws exception and stops selector thread, so must restart SPI. for (int i = 0; i < ITERS; i++) { @@ -285,6 +290,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi> /** * @throws Exception If failed. */ + @Test public void testBlockRead1() throws Exception { createSpis(); @@ -403,6 +409,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi> /** * @throws Exception If failed. */ + @Test public void testBlockRead2() throws Exception { createSpis(); @@ -538,6 +545,7 @@ public class GridTcpCommunicationSpiRecoverySelfTest<T extends CommunicationSpi> /** * @throws Exception If failed. */ + @Test public void testBlockRead3() throws Exception { createSpis(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java index 1760171..5a47b85 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/GridTcpCommunicationSpiTcpFailureDetectionSelfTest.java @@ -19,10 +19,14 @@ package org.apache.ignite.spi.communication.tcp; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.spi.communication.CommunicationSpi; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class GridTcpCommunicationSpiTcpFailureDetectionSelfTest extends GridTcpCommunicationSpiTcpSelfTest { /** */ private static final int SPI_COUNT = 4; @@ -63,6 +67,7 @@ public class GridTcpCommunicationSpiTcpFailureDetectionSelfTest extends GridTcpC /** * @throws Exception if failed. */ + @Test public void testFailureDetectionEnabled() throws Exception { assertTrue(spis[0].failureDetectionTimeoutEnabled()); assertTrue(spis[0].failureDetectionTimeout() == IgniteConfiguration.DFLT_FAILURE_DETECTION_TIMEOUT); @@ -72,4 +77,4 @@ public class GridTcpCommunicationSpiTcpFailureDetectionSelfTest extends GridTcpC assertEquals(0, spis[i].failureDetectionTimeout()); } } -} \ 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/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java index 5bee756..e304561 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/IgniteTcpCommunicationRecoveryAckClosureSelfTest.java @@ -53,11 +53,15 @@ import org.apache.ignite.testframework.junits.GridTestKernalContext; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = TcpCommunicationSpi.class, group = "Communication SPI") +@RunWith(JUnit4.class) public class IgniteTcpCommunicationRecoveryAckClosureSelfTest<T extends CommunicationSpi> extends GridSpiAbstractTest<T> { /** */ @@ -123,6 +127,7 @@ public class IgniteTcpCommunicationRecoveryAckClosureSelfTest<T extends Communic /** * @throws Exception If failed. */ + @Test public void testAckOnIdle() throws Exception { checkAck(10, 2000, 9); } @@ -130,6 +135,7 @@ public class IgniteTcpCommunicationRecoveryAckClosureSelfTest<T extends Communic /** * @throws Exception If failed. */ + @Test public void testAckOnCount() throws Exception { checkAck(10, 60_000, 10); } @@ -257,6 +263,7 @@ public class IgniteTcpCommunicationRecoveryAckClosureSelfTest<T extends Communic /** * @throws Exception If failed. */ + @Test public void testQueueOverflow() throws Exception { for (int i = 0; i < 3; i++) { try { @@ -549,4 +556,4 @@ public class IgniteTcpCommunicationRecoveryAckClosureSelfTest<T extends Communic nodes.clear(); spiRsrcs.clear(); } -} \ 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/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java index 08cf1f7..739b06b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiDropNodesTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; /** * */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiDropNodesTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -111,6 +115,7 @@ public class TcpCommunicationSpiDropNodesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOneNode() throws Exception { pred = new IgniteBiPredicate<ClusterNode, ClusterNode>() { @Override public boolean apply(ClusterNode locNode, ClusterNode rmtNode) { @@ -187,6 +192,7 @@ public class TcpCommunicationSpiDropNodesTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTwoNodesEachOther() throws Exception { pred = new IgniteBiPredicate<ClusterNode, ClusterNode>() { @Override public boolean apply(ClusterNode locNode, ClusterNode rmtNode) { http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java index 505d7a5..91cc002 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiFaultyClientTest.java @@ -47,12 +47,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; /** * Tests that faulty client will be failed if connection can't be established. */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -122,6 +126,7 @@ public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testNoServerOnHost() throws Exception { testFailClient(null); } @@ -129,6 +134,7 @@ public class TcpCommunicationSpiFaultyClientTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testNotAcceptedConnection() throws Exception { testFailClient(new FakeServer()); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java index 3e10f94..ccbd9d2 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiHalfOpenedConnectionTest.java @@ -32,10 +32,14 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.plugin.extensions.communication.Message; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests case when connection is closed only for one side, when other is not notified. */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiHalfOpenedConnectionTest extends GridCommonAbstractTest { /** Client spi. */ private TcpCommunicationSpi clientSpi; @@ -66,6 +70,7 @@ public class TcpCommunicationSpiHalfOpenedConnectionTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testReconnect() throws Exception { pairedConnections = false; @@ -75,6 +80,7 @@ public class TcpCommunicationSpiHalfOpenedConnectionTest extends GridCommonAbstr /** * @throws Exception If failed. */ + @Test public void testReconnectPaired() throws Exception { pairedConnections = true; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java index 2c17f95..e3d3b63 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiSkipMessageSendTest.java @@ -48,10 +48,14 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; 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 that the client will be segmented in time and won't hang due to canceling compute jobs. */ +@RunWith(JUnit4.class) public class TcpCommunicationSpiSkipMessageSendTest extends GridCommonAbstractTest { /** */ private static final CountDownLatch COMPUTE_JOB_STARTED = new CountDownLatch(1); @@ -105,6 +109,7 @@ public class TcpCommunicationSpiSkipMessageSendTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testClientSegmented() throws Exception { startGrid("server"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java index b2c6cbb..df7cb09 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationStatisticsTest.java @@ -46,10 +46,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 for TcpCommunicationSpi statistics. */ +@RunWith(JUnit4.class) public class TcpCommunicationStatisticsTest extends GridCommonAbstractTest { /** IP finder. */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -134,6 +138,7 @@ public class TcpCommunicationStatisticsTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("ConstantConditions") + @Test public void testStatistics() throws Exception { startGrids(2); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java index 1483364..ecca16a 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/deployment/local/GridLocalDeploymentSpiSelfTest.java @@ -35,11 +35,15 @@ import org.apache.ignite.spi.deployment.DeploymentListener; import org.apache.ignite.spi.deployment.DeploymentResource; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Local deployment SPI test. */ @GridSpiTest(spi = LocalDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest<LocalDeploymentSpi> { /** */ private static Map<ClassLoader, Set<Class<? extends ComputeTask<?, ?>>>> tasks = @@ -87,6 +91,7 @@ public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest<LocalDep * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testDeploy() throws Exception { String taskName = "GridDeploymentTestTask"; @@ -114,6 +119,7 @@ public class GridLocalDeploymentSpiSelfTest extends GridSpiAbstractTest<LocalDep * @throws Exception If failed. */ @SuppressWarnings({"TooBroadScope"}) + @Test public void testRedeploy() throws Exception { String taskName = "GridDeploymentTestTask"; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java index 27cffe9..468e4b6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryRandomStartStopTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.Event; import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base discovery random start-stop test class. * @param <T> Discovery spi type. */ +@RunWith(JUnit4.class) public abstract class AbstractDiscoveryRandomStartStopTest<T extends DiscoverySpi> extends GridSpiAbstractTest<T> { /** */ private static final int DFLT_MAX_INTERVAL = 10; @@ -151,6 +155,7 @@ public abstract class AbstractDiscoveryRandomStartStopTest<T extends DiscoverySp * @throws Exception If failed. */ @SuppressWarnings({"BusyWait"}) + @Test public void testDiscovery() throws Exception { Random rand = new Random(); @@ -214,4 +219,4 @@ public abstract class AbstractDiscoveryRandomStartStopTest<T extends DiscoverySp return attrs; } -} \ 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/spi/discovery/AbstractDiscoverySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java index c21e52d..471dc0b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoverySelfTest.java @@ -47,6 +47,9 @@ import org.apache.ignite.testframework.junits.IgniteMock; import org.apache.ignite.testframework.junits.IgniteTestResources; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; 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_NODE_METRICS_UPDATED; import static org.apache.ignite.lang.IgniteProductVersion.fromString; @@ -55,6 +58,7 @@ import static org.apache.ignite.lang.IgniteProductVersion.fromString; * Base discovery self-test class. * @param <T> SPI implementation class. */ +@RunWith(JUnit4.class) public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends GridSpiAbstractTest<T> { /** */ private static final String HTTP_ADAPTOR_MBEAN_NAME = "mbeanAdaptor:protocol=HTTP"; @@ -90,6 +94,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri * @throws Exception If failed. */ @SuppressWarnings({"UnconditionalWait"}) + @Test public void testDiscovery() throws Exception { assert spis.size() > 1; assert spiStartTime > 0; @@ -179,6 +184,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri * @throws Exception If failed. */ @SuppressWarnings({"UnconditionalWait"}) + @Test public void testMetrics() throws Exception { Collection<DiscoveryListener> listeners = new ArrayList<>(); @@ -231,6 +237,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri * * @throws Exception If test failed. */ + @Test public void testLocalMetricsUpdate() throws Exception { AtomicInteger[] locUpdCnts = new AtomicInteger[getSpiCount()]; @@ -290,6 +297,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri /** * Checks that physical address of local node is equal to local.ip property. */ + @Test public void testLocalNode() { for (DiscoverySpi spi : spis) { ClusterNode loc = spi.getLocalNode(); @@ -303,6 +311,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri /** * Check that "test.node.prop" is present on all nodes. */ + @Test public void testNodeAttributes() { for (DiscoverySpi spi : spis) { assert !spi.getRemoteNodes().isEmpty() : "No remote nodes found in Spi."; @@ -338,6 +347,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri /** * Checks that each spi can pings all other. */ + @Test public void testPing() { for (DiscoverySpi spi : spis) { for (IgniteTestResources rscrs : spiRsrcs) { @@ -356,6 +366,7 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri * * @throws Exception If failed. */ + @Test public void testNodeSerialize() throws Exception { for (DiscoverySpi spi : spis) { ClusterNode node = spi.getLocalNode(); @@ -553,4 +564,4 @@ public abstract class AbstractDiscoverySelfTest<T extends IgniteSpi> extends Gri // 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/spi/discovery/AbstractDiscoveryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java index 352ebe6..7876524 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java @@ -29,11 +29,15 @@ import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.events.Event; import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Base discovery test class. * @param <T> SPI implementation class. */ +@RunWith(JUnit4.class) public abstract class AbstractDiscoveryTest<T extends DiscoverySpi> extends GridSpiAbstractTest<T> { /** */ @SuppressWarnings({"ClassExplicitlyExtendsThread"}) @@ -125,6 +129,7 @@ public abstract class AbstractDiscoveryTest<T extends DiscoverySpi> extends Grid /** * @throws Exception If failed. */ + @Test public void testDiscovery() throws Exception { GridLocalEventListener discoLsnr = new DiscoveryListener(); @@ -152,4 +157,4 @@ public abstract class AbstractDiscoveryTest<T extends DiscoverySpi> extends Grid return attrs; } -} \ 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/spi/discovery/AuthenticationRestartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java index cf1836a..d7fc2a1 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AuthenticationRestartTest.java @@ -25,6 +25,9 @@ import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi; import org.apache.ignite.spi.discovery.tcp.TestReconnectPluginProvider; import org.apache.ignite.spi.discovery.tcp.TestReconnectProcessor; 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.testframework.GridTestUtils.waitForCondition; @@ -32,6 +35,7 @@ import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; * Checks whether client is able to reconnect to restarted cluster with * enabled security. */ +@RunWith(JUnit4.class) public class AuthenticationRestartTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -62,6 +66,7 @@ public class AuthenticationRestartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnect() throws Exception { stopGrid("server"); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java index 25de2c7..a6a64d8 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java @@ -21,11 +21,15 @@ import org.apache.ignite.cluster.ClusterMetrics; import org.apache.ignite.internal.ClusterMetricsSnapshot; 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 discovery metrics test. */ @GridCommonTest(group = "Utils") +@RunWith(JUnit4.class) public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractTest { /** Metrics serialized by Ignite 1.0 */ private static final byte[] METRICS_V1 = {0, 0, 0, 22, 0, 0, 0, 8, 64, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 15, 64, @@ -47,6 +51,7 @@ public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractT } /** */ + @Test public void testMetricsSize() { byte[] data = new byte[ClusterMetricsSnapshot.METRICS_SIZE]; @@ -62,6 +67,7 @@ public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractT } /** */ + @Test public void testSerialization() { byte[] data = new byte[ClusterMetricsSnapshot.METRICS_SIZE]; @@ -83,6 +89,7 @@ public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractT /** * Checks compatibility with old serialized metrics. */ + @Test public void testMetricsCompatibility() { ClusterMetrics metrics = ClusterMetricsSnapshot.deserialize(METRICS_V1, 0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java index 9a45d2d..1eda5fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/FilterDataForClientNodeDiscoveryTest.java @@ -32,10 +32,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.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class FilterDataForClientNodeDiscoveryTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -56,6 +60,7 @@ public class FilterDataForClientNodeDiscoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDataBag() throws Exception { startGrid(configuration(0, false)); startGrid(configuration(1, false)); @@ -73,6 +78,7 @@ public class FilterDataForClientNodeDiscoveryTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testDiscoveryServerOnlyCustomMessage() throws Exception { startGrid(configuration(0, false)); startGrid(configuration(1, false)); @@ -216,4 +222,4 @@ public class FilterDataForClientNodeDiscoveryTest 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/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java index 75bcbb1..68e28da 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/IgniteDiscoveryCacheReuseSelfTest.java @@ -31,10 +31,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; /** * Tests discovery cache reuse between topology events. */ +@RunWith(JUnit4.class) public class IgniteDiscoveryCacheReuseSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -60,6 +64,7 @@ public class IgniteDiscoveryCacheReuseSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testDiscoCacheReuseOnNodeJoin() throws Exception { startGridsMultiThreaded(2); @@ -109,4 +114,4 @@ public class IgniteDiscoveryCacheReuseSelfTest extends GridCommonAbstractTest { assertEquals("Discovery caches are not equal", alives1, alives2); } } -} \ 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/spi/discovery/LongClientConnectToClusterTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java index a079926..3e48739 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/LongClientConnectToClusterTest.java @@ -36,11 +36,15 @@ import java.net.Socket; import java.util.Collection; import java.util.Collections; import java.util.Map; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test client connects to two nodes cluster during time more than the * {@link org.apache.ignite.configuration.IgniteConfiguration#clientFailureDetectionTimeout}. */ +@RunWith(JUnit4.class) public class LongClientConnectToClusterTest extends GridCommonAbstractTest { /** Client instance name. */ public static final String CLIENT_INSTANCE_NAME = "client"; @@ -83,6 +87,7 @@ public class LongClientConnectToClusterTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientConnectToCluster() throws Exception { clientMetricsUpdateCnt = 0; http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java index 448c9af..69081c1 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/DiscoveryUnmarshalVulnerabilityTest.java @@ -32,6 +32,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.marshaller.jdk.JdkMarshaller; 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.IgniteSystemProperties.IGNITE_MARSHALLER_BLACKLIST; import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_WHITELIST; @@ -39,6 +42,7 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_MARSHALLER_WHITELI /** * Tests for whitelist and blacklist ot avoiding deserialization vulnerability. */ +@RunWith(JUnit4.class) public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest { /** Marshaller. */ private static final JdkMarshaller MARSH = new JdkMarshaller(); @@ -61,6 +65,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testNoLists() throws Exception { testExploit(true); } @@ -68,6 +73,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testWhiteListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -79,6 +85,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testWhiteListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -90,6 +97,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testBlackListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); @@ -101,6 +109,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testBlackListExcluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_excluded.txt").getPath(); @@ -112,6 +121,7 @@ public class DiscoveryUnmarshalVulnerabilityTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testBothListIncluded() throws Exception { String path = U.resolveIgnitePath("modules/core/src/test/config/class_list_exploit_included.txt").getPath(); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java index 2ed55a1..cb7ce3e 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientConnectTest.java @@ -39,7 +39,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddFinishedMessage; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; - +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * We emulate that client receive message about joining to topology earlier than some server nodes in topology. @@ -47,6 +49,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; * To emulate this we connect client to second node in topology and pause sending message about joining finishing to * third node. */ +@RunWith(JUnit4.class) public class IgniteClientConnectTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -94,6 +97,7 @@ public class IgniteClientConnectTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientConnectToBigTopology() throws Exception { Ignite ignite = startGrids(3); @@ -160,4 +164,4 @@ public class IgniteClientConnectTest extends GridCommonAbstractTest { return impl; } } -} \ 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/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java index 6bd2a45..642c08fb 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder; import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.transactions.Transaction; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.SECONDS; import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; @@ -52,6 +55,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_REA /** * Client reconnect test in multi threaded mode while cache operations are in progress. */ +@RunWith(JUnit4.class) public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstractTest { /** */ private static final int GRID_CNT = 14; @@ -95,6 +99,7 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract /** * @throws Exception If any error occurs. */ + @Test public void testMassiveServersShutdown1() throws Exception { massiveServersShutdown(StopType.FAIL_EVENT); } @@ -102,6 +107,7 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract /** * @throws Exception If any error occurs. */ + @Test public void testMassiveServersShutdown2() throws Exception { massiveServersShutdown(StopType.SIMULATE_FAIL); } @@ -109,6 +115,7 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract /** * @throws Exception If any error occurs. */ + @Test public void testMassiveServersShutdown3() throws Exception { massiveServersShutdown(StopType.CLOSE); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java index f14e0b1..916e429 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryMarshallerCheckSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.spi.IgniteSpiException; 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 for {@link org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest { /** */ private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); @@ -82,6 +86,7 @@ public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testMarshallerInConsistency() throws Exception { startGrid(0); @@ -101,6 +106,7 @@ public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testInconsistentCompactFooterSingle() throws Exception { clientServerInconsistentConfigFail(false, 1, 1); } @@ -108,6 +114,7 @@ public class TcpClientDiscoveryMarshallerCheckSelfTest extends GridCommonAbstrac /** * @throws Exception If failed. */ + @Test public void testInconsistentCompactFooterMulti() throws Exception { clientServerInconsistentConfigFail(true, 2, 10); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java index 0939e63..be76afd 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiCoordinatorChangeTest.java @@ -27,10 +27,14 @@ import org.apache.ignite.lang.IgnitePredicate; 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; /** * This class tests that a client is able to connect to another server node without leaving the cluster. */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiCoordinatorChangeTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { @@ -44,6 +48,7 @@ public class TcpClientDiscoverySpiCoordinatorChangeTest extends GridCommonAbstra * * @throws Exception If test fails. */ + @Test public void testClientNotFailed() throws Exception { TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java index e878b98..644ac59 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiFailureTimeoutSelfTest.java @@ -43,12 +43,16 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryAbstractMessage; import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingRequest; 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_NODE_FAILED; /** * Client-based discovery SPI test with failure detection timeout enabled. */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscoverySpiSelfTest { /** */ private static final int FAILURE_AWAIT_TIME = 7_000; @@ -110,6 +114,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov /** * @throws Exception in case of error. */ + @Test public void testFailureDetectionTimeoutEnabled() throws Exception { startServerNodes(1); startClientNodes(1); @@ -130,6 +135,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov /** * @throws Exception in case of error. */ + @Test public void testFailureTimeoutWorkabilityAvgTimeout() throws Exception { failureThreshold = 3000; @@ -144,6 +150,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov /** * @throws Exception in case of error. */ + @Test public void testFailureTimeoutWorkabilitySmallTimeout() throws Exception { failureThreshold = 500; @@ -160,6 +167,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov * * @throws Exception in case of error. */ + @Test public void testFailureTimeoutServerClient() throws Exception { failureThreshold = 3000; clientFailureDetectionTimeout = 2000; @@ -213,6 +221,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov * * @throws Exception in case of error. */ + @Test public void testFailureTimeout3Server() throws Exception { failureThreshold = 1000; clientFailureDetectionTimeout = 10000; @@ -319,6 +328,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnCoordinatorRouterFail1() throws Exception { clientReconnectOnCoordinatorRouterFail(1); } @@ -326,6 +336,7 @@ public class TcpClientDiscoverySpiFailureTimeoutSelfTest extends TcpClientDiscov /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnCoordinatorRouterFail2() throws Exception { clientReconnectOnCoordinatorRouterFail(2); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java index e19b121..ec44dee 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiMulticastTest.java @@ -30,6 +30,9 @@ import org.apache.ignite.spi.discovery.DiscoverySpi; import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder; 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.SECONDS; import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_DISCONNECTED; @@ -38,6 +41,7 @@ import static org.apache.ignite.events.EventType.EVT_CLIENT_NODE_RECONNECTED; /** * */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { /** */ private boolean forceSrv; @@ -95,6 +99,7 @@ public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientStartsFirst() throws Exception { IgniteInternalFuture<Ignite> fut = GridTestUtils.runAsync(new Callable<Ignite>() { @Override public Ignite call() throws Exception { @@ -149,6 +154,7 @@ public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinWithMulticast() throws Exception { joinWithMulticast(); } @@ -156,6 +162,7 @@ public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinWithMulticastForceServer() throws Exception { forceSrv = true; @@ -218,4 +225,4 @@ public class TcpClientDiscoverySpiMulticastTest extends GridCommonAbstractTest { else assertFalse(addrSnds.isEmpty()); } -} \ 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/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java index c85e94e..b52f00b 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoverySpiSelfTest.java @@ -73,6 +73,9 @@ import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeAddedMessage 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; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MINUTES; @@ -86,6 +89,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_SEGMENTED; /** * Client-based discovery tests. */ +@RunWith(JUnit4.class) public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryVmIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -299,6 +303,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinTimeout() throws Exception { clientIpFinder = new TcpDiscoveryVmIpFinder(); joinTimeout = 1000; @@ -320,6 +325,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientToClientPing() throws Exception { startGrid("server-p1"); Ignite c1 = startGrid("client-p1"); @@ -335,6 +341,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeJoin() throws Exception { startServerNodes(3); startClientNodes(3); @@ -357,6 +364,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeLeave() throws Exception { startServerNodes(3); startClientNodes(3); @@ -379,6 +387,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeFail() throws Exception { startServerNodes(3); startClientNodes(3); @@ -401,6 +410,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServerNodeJoin() throws Exception { startServerNodes(3); startClientNodes(3); @@ -423,6 +433,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServerNodeLeave() throws Exception { startServerNodes(3); startClientNodes(3); @@ -445,6 +456,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServerNodeFail() throws Exception { startServerNodes(3); startClientNodes(3); @@ -469,6 +481,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPing() throws Exception { startServerNodes(2); startClientNodes(1); @@ -487,6 +500,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPingFailedNodeFromClient() throws Exception { startServerNodes(2); startClientNodes(1); @@ -518,6 +532,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPingFailedClientNode() throws Exception { startServerNodes(2); startClientNodes(1); @@ -547,6 +562,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnRouterFail() throws Exception { clientsPerSrv = 1; @@ -575,6 +591,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientReconnectOnRouterSuspend() throws Exception { reconnectAfterSuspend(false); } @@ -584,6 +601,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientReconnectOnRouterSuspendTopologyChange() throws Exception { clientFailureDetectionTimeout = 20_000; @@ -665,6 +683,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testClientReconnectHistoryMissingOnRouter() throws Exception { clientFailureDetectionTimeout = 60000; netTimeout = 60000; @@ -712,6 +731,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterPause() throws Exception { startServerNodes(2); startClientNodes(1); @@ -740,6 +760,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testReconnectAfterMassiveTopologyChange() throws Exception { clientIpFinder = IP_FINDER; @@ -790,6 +811,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOnNetworkProblem() throws Exception { clientsPerSrv = 1; @@ -815,6 +837,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectOneServerOneClient() throws Exception { clientsPerSrv = 1; @@ -840,6 +863,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectTopologyChange1() throws Exception { clientFailureDetectionTimeout = 100000; @@ -884,6 +908,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectTopologyChange2() throws Exception { clientFailureDetectionTimeout = 100000; @@ -928,6 +953,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testGetMissedMessagesOnReconnect() throws Exception { clientsPerSrv = 1; @@ -965,6 +991,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientSegmentation() throws Exception { clientsPerSrv = 1; @@ -1014,6 +1041,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeJoinOneServer() throws Exception { startServerNodes(1); @@ -1031,6 +1059,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodeLeaveOneServer() throws Exception { startServerNodes(1); startClientNodes(1); @@ -1053,6 +1082,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testClientNodeFailOneServer() throws Exception { startServerNodes(1); startClientNodes(1); @@ -1073,6 +1103,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientAndRouterFail() throws Exception { startServerNodes(2); startClientNodes(2); @@ -1105,6 +1136,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMetrics() throws Exception { startServerNodes(3); startClientNodes(3); @@ -1165,6 +1197,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDataExchangeFromServer() throws Exception { testDataExchange("server-0"); } @@ -1172,6 +1205,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDataExchangeFromClient() throws Exception { testDataExchange("client-0"); } @@ -1216,6 +1250,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDataExchangeFromServer2() throws Exception { startServerNodes(2); @@ -1246,6 +1281,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If any error occurs. */ + @Test public void testDuplicateId() throws Exception { startServerNodes(2); @@ -1267,6 +1303,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If any error occurs. */ + @Test public void testTimeoutWaitingNodeAddedMessage() throws Exception { longSockTimeouts = true; @@ -1310,6 +1347,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If any error occurs. */ + @Test public void testGridStartTime() throws Exception { startServerNodes(2); @@ -1332,6 +1370,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinError() throws Exception { startServerNodes(1); @@ -1349,6 +1388,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinError2() throws Exception { startServerNodes(1); @@ -1367,6 +1407,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinError3() throws Exception { startServerNodes(1); @@ -1384,6 +1425,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinErrorMissedAddFinishedMessage1() throws Exception { missedAddFinishedMessage(true); } @@ -1391,6 +1433,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinErrorMissedAddFinishedMessage2() throws Exception { missedAddFinishedMessage(false); } @@ -1449,6 +1492,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientMessageWorkerStartSingleServer() throws Exception { clientMessageWorkerStart(1, 1); } @@ -1456,6 +1500,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientMessageWorkerStartTwoServers1() throws Exception { clientMessageWorkerStart(2, 1); } @@ -1463,6 +1508,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientMessageWorkerStartTwoServers2() throws Exception { clientMessageWorkerStart(2, 2); } @@ -1527,6 +1573,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testJoinMutlithreaded() throws Exception { startServerNodes(1); @@ -1550,6 +1597,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterFail() throws Exception { reconnectAfterFail(false); } @@ -1557,6 +1605,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterFailTopologyChanged() throws Exception { reconnectAfterFail(true); } @@ -1678,6 +1727,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectAfterFailConcurrentJoin() throws Exception { startServerNodes(1); @@ -1750,6 +1800,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientFailReconnectDisabled() throws Exception { reconnectDisabled = true; @@ -1791,6 +1842,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectSegmentedAfterJoinTimeoutServerFailed() throws Exception { reconnectSegmentedAfterJoinTimeout(true); } @@ -1798,6 +1850,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectSegmentedAfterJoinTimeoutNetworkError() throws Exception { reconnectSegmentedAfterJoinTimeout(false); } @@ -1898,6 +1951,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectClusterRestart() throws Exception { netTimeout = 3000; joinTimeout = 60_000; @@ -1970,6 +2024,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDisconnectAfterNetworkTimeout() throws Exception { netTimeout = 5000; joinTimeout = 60_000; @@ -2055,6 +2110,7 @@ public class TcpClientDiscoverySpiSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForceClientReconnect() throws Exception { startServerNodes(1); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java index 4dc1604..78be170 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpClientDiscoveryUnresolvedHostTest.java @@ -29,10 +29,14 @@ import org.apache.ignite.spi.IgniteSpiOperationTimeoutException; import org.apache.ignite.spi.IgniteSpiOperationTimeoutHelper; 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; /** * Client-based discovery SPI test with unresolved server hosts. */ +@RunWith(JUnit4.class) public class TcpClientDiscoveryUnresolvedHostTest extends GridCommonAbstractTest { /** */ TestTcpDiscoverySpi spi; @@ -58,6 +62,7 @@ public class TcpClientDiscoveryUnresolvedHostTest extends GridCommonAbstractTest * * @throws Exception in case of error. */ + @Test public void test() throws Exception { try { startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java index a519d25..1413f1f 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryClientSuspensionSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.internal.util.typedef.internal.U; 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 for missed client metrics update messages. */ +@RunWith(JUnit4.class) public class TcpDiscoveryClientSuspensionSelfTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -73,6 +77,7 @@ public class TcpDiscoveryClientSuspensionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testOneServer() throws Exception { doTestClientSuspension(1); } @@ -80,6 +85,7 @@ public class TcpDiscoveryClientSuspensionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testTwoServers() throws Exception { doTestClientSuspension(2); } @@ -87,6 +93,7 @@ public class TcpDiscoveryClientSuspensionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testThreeServers() throws Exception { doTestClientSuspension(3); } http://git-wip-us.apache.org/repos/asf/ignite/blob/f0544d46/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java index a66fe71..928cce7 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryConcurrentStartTest.java @@ -25,10 +25,14 @@ 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.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoveryConcurrentStartTest extends GridCommonAbstractTest { /** */ private static final int TOP_SIZE = 3; @@ -65,6 +69,7 @@ public class TcpDiscoveryConcurrentStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStart() throws Exception { for (int i = 0; i < 10; i++) { try { @@ -79,6 +84,7 @@ public class TcpDiscoveryConcurrentStartTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartClients() throws Exception { for (int i = 0; i < 20; i++) { try { @@ -108,4 +114,4 @@ public class TcpDiscoveryConcurrentStartTest 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/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java index 696225c..13946a6 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoveryMarshallerCheckSelfTest.java @@ -25,10 +25,14 @@ import org.apache.ignite.spi.IgniteSpiException; 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 for {@link TcpDiscoverySpi}. */ +@RunWith(JUnit4.class) public class TcpDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest { /** */ private static boolean sameMarsh; @@ -72,6 +76,7 @@ public class TcpDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testMarshallerInConsistency() throws Exception { sameMarsh = false; @@ -93,10 +98,11 @@ public class TcpDiscoveryMarshallerCheckSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testMarshallerConsistency() throws Exception { sameMarsh = true; startGrid(1); startGrid(2); } -} \ No newline at end of file +}