Repository: ignite Updated Branches: refs/heads/master 93ed0d5ba -> c5197e0a6
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java index 345ce80..41cb70f 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteUriDeploymentTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.GridTaskUriDeploymentDeadlockSelfTest; import org.apache.ignite.p2p.GridP2PDisabledSelfTest; @@ -39,32 +40,31 @@ import org.apache.ignite.spi.deployment.uri.scanners.http.GridHttpDeploymentSelf public class IgniteUriDeploymentTestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("URI Deployment Spi Test Suite"); - suite.addTest(new TestSuite(GridUriDeploymentConfigSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentSimpleSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentClassloaderRegisterSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentFileProcessorSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentClassLoaderSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentClassLoaderMultiThreadedSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentMultiScannersSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentConfigSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentSimpleSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentClassloaderRegisterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentFileProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentClassLoaderSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentClassLoaderMultiThreadedSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentMultiScannersSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentConfigSelfTest.class)); - suite.addTest(new TestSuite(GridFileDeploymentUndeploySelfTest.class)); - suite.addTest(new TestSuite(GridHttpDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFileDeploymentUndeploySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridHttpDeploymentSelfTest.class)); - suite.addTest(new TestSuite(GridFileDeploymentSelfTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentMultiScannersErrorThrottlingTest.class)); - suite.addTest(new TestSuite(GridUriDeploymentMd5CheckSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFileDeploymentSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentMultiScannersErrorThrottlingTest.class)); + suite.addTest(new JUnit4TestAdapter(GridUriDeploymentMd5CheckSelfTest.class)); // GAR Ant task tests. suite.addTest(IgniteToolsSelfTestSuite.suite()); - suite.addTestSuite(GridTaskUriDeploymentDeadlockSelfTest.class); - suite.addTest(new TestSuite(GridP2PDisabledSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridTaskUriDeploymentDeadlockSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PDisabledSelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java index b9a3c76..15fd725 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/tools/GridToolsSelfTest.java @@ -30,15 +30,20 @@ import org.apache.ignite.testframework.junits.common.GridCommonTest; import org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for Ant task generating GAR file. */ @GridCommonTest(group = "Tools") +@RunWith(JUnit4.class) public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCorrectAntGarTask() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -125,6 +130,7 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithExternalP2PDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -171,6 +177,7 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithDoubleP2PDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -221,6 +228,7 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithDirDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -265,6 +273,7 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithNullDescriptor() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -308,6 +317,7 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskWithFileBaseDir() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -352,6 +362,7 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAntGarTaskToString() throws Exception { String tmpDirName = GridTestProperties.getProperty("ant.gar.tmpdir"); String srcDirName = GridTestProperties.getProperty("ant.gar.srcdir"); @@ -384,4 +395,4 @@ public class GridToolsSelfTest extends GridCommonAbstractTest { garTask.toString(); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java index e10052f..934d523 100644 --- a/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java +++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/IgniteWebSessionSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal.websession; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.IgniteTestSuite; @@ -29,23 +30,22 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_OVERRIDE_MCAST_GRP public class IgniteWebSessionSelfTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Ignite Web Sessions Test Suite"); - suite.addTestSuite(WebSessionSelfTest.class); - suite.addTestSuite(WebSessionTransactionalSelfTest.class); - suite.addTestSuite(WebSessionReplicatedSelfTest.class); + suite.addTest(new JUnit4TestAdapter(WebSessionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionReplicatedSelfTest.class)); // Old implementation tests. - suite.addTestSuite(WebSessionV1SelfTest.class); - suite.addTestSuite(WebSessionTransactionalV1SelfTest.class); - suite.addTestSuite(WebSessionReplicatedV1SelfTest.class); + suite.addTest(new JUnit4TestAdapter(WebSessionV1SelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionTransactionalV1SelfTest.class)); + suite.addTest(new JUnit4TestAdapter(WebSessionReplicatedV1SelfTest.class)); System.setProperty(IGNITE_OVERRIDE_MCAST_GRP, GridTestUtils.getNextMulticastGroup(IgniteWebSessionSelfTestSuite.class)); return suite; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java index 269b273..bed35c1 100644 --- a/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java +++ b/modules/web/src/test/java/org/apache/ignite/internal/websession/WebSessionSelfTest.java @@ -46,18 +46,22 @@ import org.apache.ignite.marshaller.Marshaller; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; -import org.apache.ignite.testsuites.IgniteIgnore; import org.eclipse.jetty.security.HashLoginService; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHolder; import org.eclipse.jetty.webapp.WebAppContext; import org.jetbrains.annotations.Nullable; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests the correctness of web sessions caching functionality. */ +@RunWith(JUnit4.class) public class WebSessionSelfTest extends GridCommonAbstractTest { /** Port for test Jetty server. */ private static final int TEST_JETTY_PORT = 49090; @@ -88,6 +92,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleRequest() throws Exception { testSingleRequest("/modules/core/src/test/config/websession/example-cache.xml"); } @@ -95,7 +100,8 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ - @IgniteIgnore("https://issues.apache.org/jira/browse/IGNITE-3663") + @Ignore("https://issues.apache.org/jira/browse/IGNITE-3663") + @Test public void testSessionRenewalDuringLogin() throws Exception { testSessionRenewalDuringLogin("/modules/core/src/test/config/websession/example-cache.xml"); } @@ -103,6 +109,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSingleRequestMetaInf() throws Exception { testSingleRequest("ignite-webapp-config.xml"); } @@ -110,6 +117,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testImplicitlyAttributeModification() throws Exception { testImplicitlyModification("ignite-webapp-config.xml"); } @@ -117,6 +125,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectRequest() throws Exception { testClientReconnectRequest("/modules/core/src/test/config/websession/example-cache.xml", "/modules/core/src/test/config/websession/example-cache2.xml", @@ -477,6 +486,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { * * @throws Exception Exception If failed. */ + @Test public void testInvalidatedSession() throws Exception { String invalidatedSesId; Server srv = null; @@ -594,6 +604,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { * * @throws Exception Exception If failed. */ + @Test public void testChangeSessionId() throws Exception { String newWebSesId; Server srv = null; @@ -698,6 +709,7 @@ public class WebSessionSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRestarts() throws Exception { final AtomicReference<String> sesIdRef = new AtomicReference<>(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java index ac002b5..d7b90c3 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java +++ b/modules/yarn/src/test/java/org/apache/ignite/IgniteYarnTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.yarn.IgniteApplicationMasterSelfTest; @@ -26,13 +27,12 @@ import org.apache.ignite.yarn.IgniteApplicationMasterSelfTest; public class IgniteYarnTestSuite extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Apache Yarn Integration Test Suite"); - suite.addTest(new TestSuite(IgniteApplicationMasterSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteApplicationMasterSelfTest.class)); return suite; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java index 6e82298..ee387bf 100644 --- a/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java +++ b/modules/yarn/src/test/java/org/apache/ignite/yarn/IgniteApplicationMasterSelfTest.java @@ -28,7 +28,6 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ThreadLocalRandom; import java.util.regex.Pattern; -import junit.framework.TestCase; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; @@ -51,11 +50,18 @@ import org.apache.hadoop.yarn.client.api.AMRMClient; import org.apache.hadoop.yarn.client.api.NMClient; import org.apache.hadoop.yarn.client.api.async.AMRMClientAsync; import org.apache.hadoop.yarn.exceptions.YarnException; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +import static org.junit.Assert.assertEquals; /** * Application master tests. */ -public class IgniteApplicationMasterSelfTest extends TestCase { +@RunWith(JUnit4.class) +public class IgniteApplicationMasterSelfTest { /** */ private ApplicationMaster appMaster; @@ -68,9 +74,8 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ - @Override protected void setUp() throws Exception { - super.setUp(); - + @Before + public void setUp() throws Exception { props = new ClusterProperties(); appMaster = new ApplicationMaster("test", props); @@ -82,6 +87,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testContainerAllocate() throws Exception { appMaster.setRmClient(rmMock); appMaster.setNmClient(new NMMock()); @@ -103,12 +109,13 @@ public class IgniteApplicationMasterSelfTest extends TestCase { assertEquals(1024, req.getCapability().getMemory()); } } - + /** * Tests whether memory overhead is allocated within container memory. * * @throws Exception If failed. */ + @Test public void testMemoryOverHeadAllocation() throws Exception { appMaster.setRmClient(rmMock); appMaster.setNmClient(new NMMock()); @@ -159,6 +166,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testClusterResource() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -181,6 +189,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testClusterAllocatedResource() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -213,6 +222,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testStartReleaseContainer() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -246,6 +256,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testHostnameConstraint() throws Exception { rmMock.availableRes(new MockResource(1024, 2)); @@ -274,6 +285,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { /** * @throws Exception If failed. */ + @Test public void testContainerEnvironment() throws Exception { props.memoryPerNode(1001); props.memoryOverHeadPerNode(2002); @@ -455,7 +467,7 @@ public class IgniteApplicationMasterSelfTest extends TestCase { * @param blacklistRemovals list of resources which should be removed from the * application blacklist */ - public void updateBlacklist(List blacklistAdditions, List blacklistRemovals) { + @Override public void updateBlacklist(List blacklistAdditions, List blacklistRemovals) { // No-op. } } @@ -619,4 +631,4 @@ public class IgniteApplicationMasterSelfTest extends TestCase { return null; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java ---------------------------------------------------------------------- diff --git a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java index 0992126..81441a7 100644 --- a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java +++ b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.events.CacheEvent; import org.apache.ignite.lang.IgnitePredicate; 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 org.zeromq.ZMQ; import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; @@ -34,6 +37,7 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Tests {@link IgniteZeroMqStreamer}. */ +@RunWith(JUnit4.class) public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest { /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 1000; @@ -65,6 +69,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest { /** * @throws Exception Test exception. */ + @Test public void testZeroMqPairSocket() throws Exception { try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( @@ -77,6 +82,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest { /** * @throws Exception Test exception. */ + @Test public void testZeroMqSubSocketMultipart() throws Exception { try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( @@ -90,6 +96,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest { /** * @throws Exception Test exception. */ + @Test public void testZeroMqSubSocket() throws Exception { try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( @@ -102,6 +109,7 @@ public class IgniteZeroMqStreamerTest extends GridCommonAbstractTest { /** * @throws Exception Test exception. */ + @Test public void testZeroMqPullSocket() throws Exception { try (IgniteDataStreamer<Integer, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { try (IgniteZeroMqStreamer streamer = newStreamerInstance( http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java index a98bf56..86a6210 100644 --- a/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java +++ b/modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.zeromq; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,12 +26,11 @@ import junit.framework.TestSuite; public class IgniteZeroMqStreamerTestSuite extends TestSuite { /** * @return ZeroMQ streamer tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("ZeroMQ streamed Test Suite"); - suite.addTestSuite(IgniteZeroMqStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteZeroMqStreamerTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java index ec5630f..1a7f8d4 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/ZookeeperIpFinderTest.java @@ -37,13 +37,17 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.zk.curator.TestingCluster; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; +import org.junit.Test; import org.junit.rules.Timeout; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for {@link TcpDiscoveryZookeeperIpFinder}. * * @author Raul Kripalani */ +@RunWith(JUnit4.class) public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** Per test timeout */ @Rule @@ -142,6 +146,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testOneIgniteNodeIsAlone() throws Exception { startGrid(0); @@ -153,6 +158,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTwoIgniteNodesFindEachOther() throws Exception { // start one node startGrid(0); @@ -176,6 +182,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testThreeNodesWithThreeDifferentConfigMethods() throws Exception { // start one node startGrid(0); @@ -207,6 +214,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFourNodesStartingAndStopping() throws Exception { // start one node startGrid(0); @@ -254,6 +262,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFourNodesWithDuplicateRegistrations() throws Exception { allowDuplicateRegistrations = true; @@ -277,6 +286,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFourNodesWithNoDuplicateRegistrations() throws Exception { allowDuplicateRegistrations = false; @@ -300,6 +310,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFourNodesRestartLastSeveralTimes() throws Exception { allowDuplicateRegistrations = false; @@ -336,6 +347,7 @@ public class ZookeeperIpFinderTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testFourNodesKillRestartZookeeper() throws Exception { allowDuplicateRegistrations = false; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java index 754a6bf..689daae 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/IgniteCacheEntryListenerWithZkDiscoAtomicTest.java @@ -17,6 +17,9 @@ package org.apache.ignite.spi.discovery.zk; import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Class is added to mute {@link #testConcurrentRegisterDeregister} test in ZooKeeper suite @@ -24,8 +27,10 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomi * * When slow down is tracked down and fixed this class can be replaced back with its parent. */ +@RunWith(JUnit4.class) public class IgniteCacheEntryListenerWithZkDiscoAtomicTest extends IgniteCacheEntryListenerAtomicTest { /** {@inheritDoc} */ + @Test @Override public void testConcurrentRegisterDeregister() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8109"); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java index 1a9e351..d73544b 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite1.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.curator.test.ByteCodeRewrite; import org.apache.ignite.spi.discovery.zk.internal.ZookeeperClientTest; @@ -51,18 +52,17 @@ public class ZookeeperDiscoverySpiTestSuite1 extends TestSuite { /** * @return Test suite. - * @throws Exception Thrown in case of the failure. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { System.setProperty("zookeeper.forceSync", "false"); System.setProperty("zookeeper.jmx.log4j.disable", "true"); TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(ZookeeperClientTest.class); - suite.addTestSuite(ZookeeperDiscoverySpiTest.class); - suite.addTestSuite(ZookeeperDiscoverySpiSaslFailedAuthTest.class); - suite.addTestSuite(ZookeeperDiscoverySpiSaslSuccessfulAuthTest.class); + suite.addTest(new JUnit4TestAdapter(ZookeeperClientTest.class)); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySpiTest.class)); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySpiSaslFailedAuthTest.class)); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySpiSaslSuccessfulAuthTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java index f64c57e..c6a67f3 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite2.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.IgniteClientReconnectCacheTest; import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest; @@ -43,12 +44,12 @@ public class ZookeeperDiscoverySpiTestSuite2 extends ZookeeperDiscoverySpiAbstra TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(GridCachePartitionedNodeRestartTest.class); - suite.addTestSuite(IgniteCacheEntryListenerWithZkDiscoAtomicTest.class); - suite.addTestSuite(IgniteClientReconnectCacheTest.class); - suite.addTestSuite(GridCachePartitionedMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCommandHandlerTest.class); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheEntryListenerWithZkDiscoAtomicTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientReconnectCacheTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCommandHandlerTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java index c988205..403232d 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite3.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDataStructuresTest; import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedNodeRestartTxSelfTest; @@ -47,15 +48,15 @@ public class ZookeeperDiscoverySpiTestSuite3 extends ZookeeperDiscoverySpiAbstra TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(GridCacheReplicatedNodeRestartSelfTest.class); - suite.addTestSuite(GridEventConsumeSelfTest.class); - suite.addTestSuite(GridCachePartitionedNodeRestartTxSelfTest.class); - suite.addTestSuite(IgniteClientDataStructuresTest.class); - suite.addTestSuite(GridCacheReplicatedSequenceApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedSequenceApiSelfTest.class); - suite.addTestSuite(GridCacheAtomicMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridCachePartitionedMultiJvmFullApiSelfTest.class); - suite.addTestSuite(GridP2PContinuousDeploymentSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedNodeRestartSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridEventConsumeSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedNodeRestartTxSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteClientDataStructuresTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedSequenceApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCachePartitionedMultiJvmFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridP2PContinuousDeploymentSelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java index cb8010b..5726260 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySpiTestSuite4.java @@ -17,6 +17,7 @@ package org.apache.ignite.spi.discovery.zk; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.ClusterNodeMetricsUpdateTest; import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePutRetryAtomicSelfTest; @@ -44,13 +45,13 @@ public class ZookeeperDiscoverySpiTestSuite4 extends ZookeeperDiscoverySpiAbstra TestSuite suite = new TestSuite("ZookeeperDiscoverySpi Test Suite"); - suite.addTestSuite(ZookeeperDiscoverySuitePreprocessorTest.class); - suite.addTestSuite(IgniteCachePutRetryAtomicSelfTest.class); - suite.addTestSuite(IgniteCachePutRetryTransactionalSelfTest.class); - suite.addTestSuite(ClusterNodeMetricsUpdateTest.class); - suite.addTestSuite(GridCacheAtomicMultiNodeFullApiSelfTest.class); - suite.addTestSuite(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class); - suite.addTestSuite(IgniteCacheReplicatedQuerySelfTest.class); + suite.addTest(new JUnit4TestAdapter(ZookeeperDiscoverySuitePreprocessorTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutRetryAtomicSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCachePutRetryTransactionalSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(ClusterNodeMetricsUpdateTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheAtomicMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridCacheReplicatedAtomicMultiNodeFullApiSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteCacheReplicatedQuerySelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java index 28cf17f..0f9481b 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/ZookeeperDiscoverySuitePreprocessorTest.java @@ -27,6 +27,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.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Sanity test verifying that configuration callback specified via @@ -34,6 +37,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; * <p> * This test should be run as part of {@link ZookeeperDiscoverySpiTestSuite2}. */ +@RunWith(JUnit4.class) public class ZookeeperDiscoverySuitePreprocessorTest extends GridCommonAbstractTest { /** */ private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true); @@ -62,6 +66,7 @@ public class ZookeeperDiscoverySuitePreprocessorTest extends GridCommonAbstractT /** * @throws Exception If failed. */ + @Test public void testSpiConfigurationIsChanged() throws Exception { startGrid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java index e3b91c7..70edebb 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperClientTest.java @@ -39,10 +39,14 @@ import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.ZooDefs; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.Stat; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ZookeeperClientTest extends GridCommonAbstractTest { /** */ private static final int SES_TIMEOUT = 60_000; @@ -69,6 +73,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSaveLargeValue() throws Exception { startZK(1); @@ -100,6 +105,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClose() throws Exception { startZK(1); @@ -121,6 +127,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateAll() throws Exception { startZK(1); @@ -142,6 +149,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateAllRequestOverflow() throws Exception { startZK(1); @@ -164,6 +172,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCreateAllNodeExists() throws Exception { startZK(1); @@ -187,6 +196,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeleteAll() throws Exception { startZK(1); @@ -209,6 +219,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeleteAllRequestOverflow() throws Exception { startZK(1); @@ -235,6 +246,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeleteAllNoNode() throws Exception { startZK(1); @@ -252,6 +264,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss1() throws Exception { ZookeeperClient client = new ZookeeperClient(log, "localhost:2200", 3000, null); @@ -268,6 +281,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss2() throws Exception { startZK(1); @@ -290,6 +304,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss3() throws Exception { startZK(1); @@ -318,6 +333,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionLoss4() throws Exception { startZK(1); @@ -355,6 +371,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnect1() throws Exception { startZK(1); @@ -386,6 +403,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnect1_Callback() throws Exception { startZK(1); @@ -428,6 +446,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnect1_InCallback() throws Exception { startZK(1); @@ -474,6 +493,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnect2() throws Exception { startZK(1); @@ -489,6 +509,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnect3() throws Exception { startZK(3); @@ -512,6 +533,7 @@ public class ZookeeperClientTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnect4() throws Exception { startZK(3); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java index c90f6d4..61d7382 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslFailedAuthTest.java @@ -18,16 +18,21 @@ package org.apache.ignite.spi.discovery.zk.internal; import org.apache.zookeeper.client.ZooKeeperSaslClient; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.IgniteSystemProperties.IGNITE_ZOOKEEPER_DISCOVERY_MAX_RETRY_COUNT; /** * */ +@RunWith(JUnit4.class) public class ZookeeperDiscoverySpiSaslFailedAuthTest extends ZookeeperDiscoverySpiSaslAuthAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIgniteNodeWithInvalidPasswordFailsToJoin() throws Exception { System.setProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY, "InvalidZookeeperClient"); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java index 5ee0a43..065e4f5 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiSaslSuccessfulAuthTest.java @@ -17,14 +17,19 @@ package org.apache.ignite.spi.discovery.zk.internal; import org.apache.zookeeper.client.ZooKeeperSaslClient; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ +@RunWith(JUnit4.class) public class ZookeeperDiscoverySpiSaslSuccessfulAuthTest extends ZookeeperDiscoverySpiSaslAuthAbstractTest { /** * @throws Exception If failed. */ + @Test public void testIgniteNodesWithValidPasswordSuccessfullyJoins() throws Exception { System.setProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY, "ValidZookeeperClient"); @@ -37,6 +42,7 @@ public class ZookeeperDiscoverySpiSaslSuccessfulAuthTest extends ZookeeperDiscov /** * @throws Exception If failed. */ + @Test public void testIgniteNodeWithoutSaslConfigurationSuccessfullyJoins() throws Exception { //clearing SASL-related system properties that were set in beforeTest clearSaslSystemProperties(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java ---------------------------------------------------------------------- diff --git a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java index b932531..b47d51e 100644 --- a/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java +++ b/modules/zookeeper/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiTest.java @@ -138,6 +138,9 @@ import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.server.quorum.QuorumPeer; import org.jetbrains.annotations.Nullable; import org.junit.Assert; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; @@ -160,6 +163,7 @@ import static org.apache.zookeeper.ZooKeeper.ZOOKEEPER_CLIENT_CNXN_SOCKET; * */ @SuppressWarnings("deprecation") +@RunWith(JUnit4.class) public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** */ private static final String IGNITE_ZK_ROOT = ZookeeperDiscoverySpi.DFLT_ROOT_PATH; @@ -554,6 +558,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * For more information about the problem refer to * <a href="https://issues.apache.org/jira/browse/IGNITE-8857">IGNITE-8857</a>. */ + @Test public void testNodeAttributesNotReferencingZookeeperClusterNode() throws Exception { userAttrs = new HashMap<>(); userAttrs.put("testAttr", "testAttr"); @@ -581,6 +586,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testZkRootNotExists() throws Exception { zkRootPath = "/a/b/c"; @@ -600,6 +606,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMetadataUpdate() throws Exception { startGrid(0); @@ -616,6 +623,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNodeAddresses() throws Exception { startGridsMultiThreaded(3); @@ -641,6 +649,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSetConsistentId() throws Exception { startGridsMultiThreaded(3); @@ -666,6 +675,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultConsistentId() throws Exception { dfltConsistenId = true; @@ -690,6 +700,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception if failed. */ + @Test public void testMbean() throws Exception { startGrids(3); @@ -722,6 +733,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientNodesStatus() throws Exception { startGrid(0); @@ -774,6 +786,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLocalAuthenticationFails() throws Exception { auth = ZkTestNodeAuthenticator.factory(getTestIgniteInstanceName(0)); @@ -799,6 +812,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testAuthentication() throws Exception { auth = ZkTestNodeAuthenticator.factory(getTestIgniteInstanceName(1), getTestIgniteInstanceName(5)); @@ -907,6 +921,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStopNode_1() throws Exception { startGrids(5); @@ -924,6 +939,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCustomEventsSimple1_SingleNode() throws Exception { ackEveryEventSystemProperty(); @@ -937,6 +953,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCustomEventsSimple1_5_Nodes() throws Exception { ackEveryEventSystemProperty(); @@ -952,6 +969,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCustomEvents_FastStopProcess_1() throws Exception { customEvents_FastStopProcess(1, 0); } @@ -959,6 +977,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCustomEvents_FastStopProcess_2() throws Exception { customEvents_FastStopProcess(5, 5); } @@ -1133,6 +1152,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @see <a href="https://issues.apache.org/jira/browse/IGNITE-9040">IGNITE-9040</a> ticket for more context of the test. */ + @Test public void testStopNodeOnSegmentaion() throws Exception { try { System.setProperty("IGNITE_WAL_LOG_TX_RECORDS", "true"); @@ -1234,6 +1254,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSegmentation1() throws Exception { sesTimeout = 2000; testSockNio = true; @@ -1271,6 +1292,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSegmentation2() throws Exception { sesTimeout = 2000; @@ -1301,6 +1323,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testSegmentation3() throws Exception { sesTimeout = 5000; @@ -1341,6 +1364,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testQuorumRestore() throws Exception { sesTimeout = 60_000; @@ -1378,6 +1402,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore1() throws Exception { testSockNio = true; @@ -1393,6 +1418,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore2() throws Exception { testSockNio = true; @@ -1408,6 +1434,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_NonCoordinator1() throws Exception { connectionRestore_NonCoordinator(false); } @@ -1415,6 +1442,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_NonCoordinator2() throws Exception { connectionRestore_NonCoordinator(true); } @@ -1474,6 +1502,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator1() throws Exception { connectionRestore_Coordinator(1, 1, 0); } @@ -1481,6 +1510,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator1_1() throws Exception { connectionRestore_Coordinator(1, 1, 1); } @@ -1488,6 +1518,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator2() throws Exception { connectionRestore_Coordinator(1, 3, 0); } @@ -1495,6 +1526,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator3() throws Exception { connectionRestore_Coordinator(3, 3, 0); } @@ -1502,6 +1534,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore_Coordinator4() throws Exception { connectionRestore_Coordinator(3, 3, 1); } @@ -1665,6 +1698,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartWithClient() throws Exception { final int NODES = 20; @@ -1700,6 +1734,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStart() throws Exception { final int NODES = 20; @@ -1735,6 +1770,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop1() throws Exception { concurrentStartStop(1); } @@ -1742,6 +1778,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop2() throws Exception { concurrentStartStop(5); } @@ -1749,6 +1786,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConcurrentStartStop2_EventsThrottle() throws Exception { System.setProperty(ZookeeperDiscoveryImpl.IGNITE_ZOOKEEPER_DISCOVERY_SPI_MAX_EVTS, "1"); @@ -1812,6 +1850,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClusterRestart() throws Exception { startGridsMultiThreaded(3, false); @@ -1827,6 +1866,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionRestore4() throws Exception { testSockNio = true; @@ -1842,6 +1882,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop_1_Node() throws Exception { startGrid(0); @@ -1853,6 +1894,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRestarts_2_Nodes() throws Exception { startGrid(0); @@ -1870,6 +1912,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop_2_Nodes_WithCache() throws Exception { startGrids(2); @@ -1891,6 +1934,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop_2_Nodes() throws Exception { ackEveryEventSystemProperty(); @@ -1913,6 +1957,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultipleClusters() throws Exception { Ignite c0 = startGrid(0); @@ -1967,6 +2012,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop1() throws Exception { ackEveryEventSystemProperty(); @@ -1997,6 +2043,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop3() throws Exception { startGrids(4); @@ -2012,6 +2059,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop4() throws Exception { startGrids(6); @@ -2040,6 +2088,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStop2() throws Exception { startGridsMultiThreaded(10, false); @@ -2059,6 +2108,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartStopWithClients() throws Exception { final int SRVS = 3; @@ -2090,6 +2140,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyChangeMultithreaded() throws Exception { topologyChangeWithRestarts(false, false); } @@ -2097,6 +2148,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyChangeMultithreaded_RestartZk() throws Exception { try { topologyChangeWithRestarts(true, false); @@ -2111,6 +2163,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testTopologyChangeMultithreaded_RestartZk_CloseClients() throws Exception { try { topologyChangeWithRestarts(true, true); @@ -2226,6 +2279,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandomTopologyChanges() throws Exception { randomTopologyChanges(false, false); } @@ -2301,6 +2355,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandomTopologyChanges_RestartZk() throws Exception { randomTopologyChanges(true, false); } @@ -2308,6 +2363,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRandomTopologyChanges_CloseClients() throws Exception { randomTopologyChanges(false, true); } @@ -2315,6 +2371,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployService1() throws Exception { startGridsMultiThreaded(3); @@ -2324,6 +2381,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployService2() throws Exception { clientMode(false); @@ -2339,6 +2397,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDeployService3() throws Exception { IgniteInternalFuture fut = GridTestUtils.runAsync(new Callable() { @Override public Object call() throws Exception { @@ -2364,6 +2423,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testLargeUserAttribute1() throws Exception { initLargeAttribute(); @@ -2385,6 +2445,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testLargeUserAttribute2() throws Exception { startGrid(0); @@ -2403,6 +2464,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testLargeUserAttribute3() throws Exception { Set<Integer> idxs = ThreadLocalRandom.current() .ints(0, 10) @@ -2444,6 +2506,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testLargeCustomEvent() throws Exception { Ignite srv0 = startGrid(0); @@ -2475,6 +2538,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectSessionExpire1_1() throws Exception { clientReconnectSessionExpire(false); } @@ -2482,6 +2546,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testClientReconnectSessionExpire1_2() throws Exception { clientReconnectSessionExpire(true); } @@ -2511,6 +2576,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForceClientReconnect() throws Exception { final int SRVS = 3; @@ -2536,6 +2602,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testForcibleClientFail() throws Exception { final int SRVS = 3; @@ -2561,6 +2628,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDuplicatedNodeId() throws Exception { UUID nodeId0 = nodeId = UUID.randomUUID(); @@ -2603,6 +2671,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testPing() throws Exception { sesTimeout = 5000; @@ -2644,6 +2713,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWithPersistence1() throws Exception { startWithPersistence(false); } @@ -2651,6 +2721,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testWithPersistence2() throws Exception { startWithPersistence(true); } @@ -2658,6 +2729,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoOpCommunicationFailureResolve_1() throws Exception { communicationFailureResolve_Simple(2); } @@ -2665,6 +2737,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_2() throws Exception { communicationFailureResolve_Simple(10); } @@ -2708,6 +2781,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_3() throws Exception { sesTimeout = 2000; commFailureRslvr = NoOpCommunicationFailureResolver.FACTORY; @@ -2754,6 +2828,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_4() throws Exception { testCommSpi = true; @@ -2796,6 +2871,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNoOpCommunicationErrorResolve_5() throws Exception { testCommSpi = true; @@ -2857,6 +2933,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillNode_1() throws Exception { communicationFailureResolve_KillNodes(2, Collections.singleton(2L)); } @@ -2864,6 +2941,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillNode_2() throws Exception { communicationFailureResolve_KillNodes(3, Collections.singleton(2L)); } @@ -2871,6 +2949,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillNode_3() throws Exception { communicationFailureResolve_KillNodes(10, Arrays.asList(2L, 4L, 6L)); } @@ -2878,6 +2957,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_1() throws Exception { communicationFailureResolve_KillNodes(2, Collections.singleton(1L)); } @@ -2885,6 +2965,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_2() throws Exception { communicationFailureResolve_KillNodes(3, Collections.singleton(1L)); } @@ -2892,6 +2973,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_3() throws Exception { communicationFailureResolve_KillNodes(10, Arrays.asList(1L, 4L, 6L)); } @@ -2899,6 +2981,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationErrorResolve_KillCoordinator_4() throws Exception { communicationFailureResolve_KillNodes(10, Arrays.asList(1L, 2L, 3L)); } @@ -2958,6 +3041,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationFailureResolve_KillCoordinator_5() throws Exception { sesTimeout = 2000; @@ -3002,6 +3086,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationFailureResolve_KillRandom() throws Exception { sesTimeout = 2000; @@ -3055,6 +3140,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultCommunicationFailureResolver1() throws Exception { testCommSpi = true; sesTimeout = 5000; @@ -3081,6 +3167,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultCommunicationFailureResolver2() throws Exception { testCommSpi = true; sesTimeout = 5000; @@ -3107,6 +3194,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultCommunicationFailureResolver3() throws Exception { defaultCommunicationFailureResolver_BreakCommunication(3, 1); } @@ -3114,6 +3202,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultCommunicationFailureResolver4() throws Exception { defaultCommunicationFailureResolver_BreakCommunication(3, 0); } @@ -3121,6 +3210,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDefaultCommunicationFailureResolver5() throws Exception { defaultCommunicationFailureResolver_BreakCommunication(10, 1, 3, 6); } @@ -3160,6 +3250,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationFailureResolve_CachesInfo1() throws Exception { testCommSpi = true; sesTimeout = 5000; @@ -3253,6 +3344,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationFailureResolve_CachesInfo2() throws Exception { testCommSpi = true; sesTimeout = 5000; @@ -3349,6 +3441,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @SuppressWarnings("unchecked") + @Test public void testCommunicationFailureResolve_ConcurrentDiscoveyEvents() throws Exception { sesTimeout = 5000; @@ -3460,6 +3553,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testCommunicationFailureResolve_ConcurrentMultinode() throws Exception { sesTimeout = 5000; @@ -3493,6 +3587,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testConnectionCheck() throws Exception { final int NODES = 5; @@ -3515,6 +3610,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectDisabled_ConnectionLost() throws Exception { clientReconnectDisabled = true; @@ -3556,6 +3652,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testServersLeft_FailOnTimeout() throws Exception { startGrid(0); @@ -3593,6 +3690,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * */ + @Test public void testStartNoServers_FailOnTimeout() { joinTimeout = 3000; @@ -3619,6 +3717,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartNoServer_WaitForServers1() throws Exception { startNoServer_WaitForServers(0); } @@ -3626,6 +3725,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartNoServer_WaitForServers2() throws Exception { startNoServer_WaitForServers(10_000); } @@ -3663,6 +3763,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDisconnectOnServersLeft_1() throws Exception { disconnectOnServersLeft(1, 1); } @@ -3670,6 +3771,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDisconnectOnServersLeft_2() throws Exception { disconnectOnServersLeft(5, 1); } @@ -3677,6 +3779,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDisconnectOnServersLeft_3() throws Exception { disconnectOnServersLeft(1, 10); } @@ -3684,6 +3787,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDisconnectOnServersLeft_4() throws Exception { disconnectOnServersLeft(5, 10); } @@ -3691,6 +3795,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testDisconnectOnServersLeft_5() throws Exception { joinTimeout = 10_000; @@ -3771,6 +3876,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectServersRestart_1() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8178"); @@ -3780,6 +3886,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectServersRestart_2() throws Exception { fail("https://issues.apache.org/jira/browse/IGNITE-8178"); @@ -3794,6 +3901,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testSimpleSplitBrain() throws Exception { failCommSpi = true; @@ -3844,6 +3952,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testNotActualSplitBrain() throws Exception { failCommSpi = true; @@ -3891,6 +4000,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { * * @throws Exception If failed. */ + @Test public void testAlmostSplitBrain() throws Exception { failCommSpi = true; @@ -4231,6 +4341,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testReconnectServersRestart_3() throws Exception { startGrid(0); @@ -4267,6 +4378,7 @@ public class ZookeeperDiscoverySpiTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testStartNoZk() throws Exception { stopZkCluster();