http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java index a8cd89c..fe9623c 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridServiceInjectionSelfTest.java @@ -26,10 +26,14 @@ import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests for injected service. */ +@RunWith(JUnit4.class) public class GridServiceInjectionSelfTest extends GridCommonAbstractTest implements Serializable { /** */ private static final long serialVersionUID = 0L; @@ -57,6 +61,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureField() throws Exception { grid(0).compute().call(new IgniteCallable<Object>() { @ServiceResource(serviceName = SERVICE_NAME1) @@ -76,6 +81,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureFieldProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable<Object>() { @ServiceResource(serviceName = SERVICE_NAME2, proxyInterface = DummyService.class) @@ -97,6 +103,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureFieldLocalProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable<Object>() { @ServiceResource(serviceName = SERVICE_NAME1, proxyInterface = DummyService.class) @@ -118,6 +125,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureFieldWithIncorrectType() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable<Void>() { @Override public Void call() { @@ -140,6 +148,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureMethod() throws Exception { grid(0).compute().call(new IgniteCallable<Object>() { private DummyService svc; @@ -164,6 +173,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureMethodProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable<Object>() { private DummyService svc; @@ -189,6 +199,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureMethodLocalProxy() throws Exception { grid(0).compute(grid(0).cluster().forRemotes()).call(new IgniteCallable<Object>() { private DummyService svc; @@ -214,6 +225,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithIncorrectType() throws Exception { GridTestUtils.assertThrowsAnyCause(log, new Callable<Void>() { @Override public Void call() { @@ -236,6 +248,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureFieldWithNonExistentService() throws Exception { grid(0).compute().call(new IgniteCallable<Object>() { @ServiceResource(serviceName = "nonExistentService") @@ -252,6 +265,7 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithNonExistentService() throws Exception { grid(0).compute().call(new IgniteCallable<Object>() { @ServiceResource(serviceName = "nonExistentService") @@ -299,4 +313,4 @@ public class GridServiceInjectionSelfTest extends GridCommonAbstractTest impleme System.out.println("Executing service: " + ctx.name()); } } -} \ No newline at end of file +}
http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java index afb34b4..d891f91 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridSpringResourceInjectionSelfTest.java @@ -27,6 +27,9 @@ import org.apache.ignite.lang.IgniteCallable; import org.apache.ignite.resources.SpringResource; 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 org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.NoUniqueBeanDefinitionException; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -35,6 +38,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * Tests for injected resource. */ @SuppressWarnings("unused") +@RunWith(JUnit4.class) public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest { /** Bean name. */ private static final String DUMMY_BEAN = "dummyResourceBean"; @@ -51,6 +55,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureFieldByResourceName() throws Exception { grid.compute().call(new IgniteCallable<Object>() { @SpringResource(resourceName = DUMMY_BEAN) @@ -67,6 +72,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureFieldByResourceClass() throws Exception { grid.compute().call(new IgniteCallable<Object>() { @SpringResource(resourceClass = DummyResourceBean.class) @@ -83,6 +89,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureFieldByResourceClassWithMultipleBeans() throws Exception { IgniteConfiguration anotherCfg = new IgniteConfiguration(); anotherCfg.setIgniteInstanceName("anotherGrid"); @@ -109,6 +116,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with non-existing resource name. */ + @Test public void testClosureFieldWithWrongResourceName() { assertError(new IgniteCallable<Object>() { @SpringResource(resourceName = "nonExistentResource") @@ -125,6 +133,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with non-existing resource class. */ + @Test public void testClosureFieldWithWrongResourceClass() { assertError(new IgniteCallable<Object>() { @SpringResource(resourceClass = AnotherDummyResourceBean.class) @@ -142,6 +151,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with both resource and class set (ambiguity). */ + @Test public void testClosureFieldByResourceClassAndName() { assertError(new IgniteCallable<Object>() { @SpringResource(resourceClass = DummyResourceBean.class, resourceName = DUMMY_BEAN) @@ -158,6 +168,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with no name and class set. */ + @Test public void testClosureFieldWithNoParams() { assertError(new IgniteCallable<Object>() { @SpringResource @@ -174,6 +185,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithResourceName() throws Exception { grid.compute().call(new IgniteCallable<Object>() { private DummyResourceBean dummyRsrcBean; @@ -196,6 +208,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithResourceClass() throws Exception { grid.compute().call(new IgniteCallable<Object>() { private DummyResourceBean dummyRsrcBean; @@ -218,6 +231,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * @throws Exception If failed. */ + @Test public void testClosureMethodWithResourceClassWithMultipleBeans() throws Exception { IgniteConfiguration anotherCfg = new IgniteConfiguration(); anotherCfg.setIgniteInstanceName("anotherGrid"); @@ -253,6 +267,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with non-existing resource name. */ + @Test public void testClosureMethodWithWrongResourceName() { assertError(new IgniteCallable<Object>() { private DummyResourceBean dummyRsrcBean; @@ -273,6 +288,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with non-existing resource class. */ + @Test public void testClosureMethodWithWrongResourceClass() { assertError(new IgniteCallable<Object>() { private AnotherDummyResourceBean dummyRsrcBean; @@ -294,6 +310,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with both resource and class set (ambiguity). */ + @Test public void testClosureMethodByResourceClassAndName() { assertError(new IgniteCallable<Object>() { @SpringResource(resourceClass = DummyResourceBean.class, resourceName = DUMMY_BEAN) @@ -310,6 +327,7 @@ public class GridSpringResourceInjectionSelfTest extends GridCommonAbstractTest /** * Resource injection with no params. */ + @Test public void testClosureMethodWithNoParams() { assertError(new IgniteCallable<Object>() { @SpringResource http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java index dcf42c0..8c0c063 100644 --- a/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/internal/processors/resource/GridTransformSpringInjectionSelfTest.java @@ -36,6 +36,9 @@ import org.apache.ignite.resources.SpringResource; import org.apache.ignite.transactions.Transaction; import org.apache.ignite.transactions.TransactionConcurrency; import org.apache.ignite.transactions.TransactionIsolation; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -45,6 +48,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL; /** * */ +@RunWith(JUnit4.class) public class GridTransformSpringInjectionSelfTest extends GridCacheAbstractSelfTest { /** {@inheritDoc} */ @Override protected int gridCount() { @@ -60,6 +64,7 @@ public class GridTransformSpringInjectionSelfTest extends GridCacheAbstractSelfT /** * @throws Exception If failed. */ + @Test public void testTransformResourceInjection() throws Exception { Ignite grid = grid(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java b/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java index 96cae61..4aeb76d 100644 --- a/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/p2p/GridP2PUserVersionChangeSelfTest.java @@ -42,6 +42,9 @@ import org.apache.ignite.testframework.GridTestUtils; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testsuites.IgniteIgnore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -59,6 +62,7 @@ import static org.apache.ignite.events.EventType.EVT_TASK_UNDEPLOYED; * make sure that a new class loader is created on remote node. */ @SuppressWarnings({"ProhibitedExceptionDeclared", "unchecked"}) +@RunWith(JUnit4.class) public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { /** Current deployment mode. */ private DeploymentMode depMode; @@ -118,6 +122,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testRedeployVersionChangeContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -127,6 +132,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If test failed. */ + @Test public void testRedeployVersionChangeSharedMode() throws Exception { depMode = DeploymentMode.SHARED; @@ -183,6 +189,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRedeployOnNodeRestartContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -228,6 +235,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testRedeployOnNodeRestartSharedMode() throws Exception { depMode = DeploymentMode.SHARED; @@ -287,6 +295,7 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { * @throws Exception If failed. */ @IgniteIgnore(value = "https://issues.apache.org/jira/browse/IGNITE-604", forceFailure = true) + @Test public void testCacheRedeployVersionChangeContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -377,4 +386,4 @@ public class GridP2PUserVersionChangeSelfTest extends GridCommonAbstractTest { "<bean id=\"userVersion\" class=\"java.lang.String\"><constructor-arg value=\"" + userVer + "\"/></bean> " + "</beans>"; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java index 3104b8e..6e5cb0b 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteExcludeInConfigurationTest.java @@ -26,17 +26,22 @@ import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.X; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static org.apache.ignite.internal.IgniteComponentType.SPRING; /** * Checks excluding properties, beans with not existing classes in spring. */ +@RunWith(JUnit4.class) public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest { private URL cfgLocation = U.resolveIgniteUrl( "modules/spring/src/test/java/org/apache/ignite/spring/sprint-exclude.xml"); /** Spring should exclude properties by list and ignore beans with class not existing in classpath. */ + @Test public void testExclude() throws Exception { IgniteSpringHelper spring = SPRING.create(false); @@ -70,6 +75,7 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest { } /** Spring should fail if bean class not exist in classpath. */ + @Test public void testFail() throws Exception { IgniteSpringHelper spring = SPRING.create(false); @@ -79,4 +85,4 @@ public class IgniteExcludeInConfigurationTest extends GridCommonAbstractTest { assertTrue(X.hasCause(e, ClassNotFoundException.class)); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java index 2307a35..2cbeb00 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/IgniteStartFromStreamConfigurationTest.java @@ -25,16 +25,21 @@ import org.apache.ignite.cache.CacheAtomicityMode; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Checks starts from Stream. */ +@RunWith(JUnit4.class) public class IgniteStartFromStreamConfigurationTest extends GridCommonAbstractTest { /** * Tests starts from stream. * * @throws Exception If failed. */ + @Test public void testStartFromStream() throws Exception { String cfg = "examples/config/example-cache.xml"; @@ -51,4 +56,4 @@ public class IgniteStartFromStreamConfigurationTest extends GridCommonAbstractTe } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java index 891c42e..ee1f4f6 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/injection/GridServiceInjectionSpringResourceTest.java @@ -26,6 +26,9 @@ import org.apache.ignite.resources.SpringResource; import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.EventListener; import org.springframework.context.support.AbstractApplicationContext; @@ -43,6 +46,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; /** * Tests for injected service. */ +@RunWith(JUnit4.class) public class GridServiceInjectionSpringResourceTest extends GridCommonAbstractTest { /** Service name. */ private static final String SERVICE_NAME = "testService"; @@ -78,6 +82,7 @@ public class GridServiceInjectionSpringResourceTest extends GridCommonAbstractTe /** * @throws Exception If failed. */ + @Test public void testDeployServiceWithSpring() throws Exception { generateConfigXmls(NODES); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java b/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java index 2a06deb..7881ebb 100644 --- a/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/spring/injection/IgniteSpringBeanSpringResourceInjectionTest.java @@ -32,12 +32,16 @@ import org.apache.ignite.resources.SpringResource; import org.apache.ignite.services.Service; import org.apache.ignite.services.ServiceContext; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Test checking injections of {@link SpringResource} annotated fields. */ +@RunWith(JUnit4.class) public class IgniteSpringBeanSpringResourceInjectionTest extends GridCommonAbstractTest { /** */ private static final String SPRING_CFG_LOCATION = "/org/apache/ignite/spring/injection/spring-bean.xml"; @@ -184,6 +188,7 @@ public class IgniteSpringBeanSpringResourceInjectionTest extends GridCommonAbstr } /** */ + @Test public void testSpringResourceInjectedInCacheStore() throws Exception { doTestSpringResourceInjected( new TestSpringResourceInjectedRunnable(SPRING_CFG_LOCATION, BEAN_TO_INJECT_NAME) { @@ -199,6 +204,7 @@ public class IgniteSpringBeanSpringResourceInjectionTest extends GridCommonAbstr } /** */ + @Test public void testSpringResourceInjectedInService() throws Exception { doTestSpringResourceInjected( new TestSpringResourceInjectedRunnable(SPRING_CFG_LOCATION, BEAN_TO_INJECT_NAME) { http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java index e120aaa..39cda04 100644 --- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java +++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteResourceSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.internal.processors.resource.GridLoggerInjectionSelfTest; import org.apache.ignite.internal.processors.resource.GridResourceProcessorSelfTest; @@ -31,16 +32,15 @@ import org.apache.ignite.testframework.IgniteTestSuite; public class IgniteResourceSelfTestSuite extends TestSuite { /** * @return Resource injection test suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new IgniteTestSuite("Ignite Resource Injection Test Suite"); - suite.addTestSuite(GridResourceProcessorSelfTest.class); - suite.addTestSuite(GridLoggerInjectionSelfTest.class); - suite.addTestSuite(GridServiceInjectionSelfTest.class); - suite.addTestSuite(GridSpringResourceInjectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridResourceProcessorSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridLoggerInjectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridServiceInjectionSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringResourceInjectionSelfTest.class)); return suite; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java index 0943d51..c16a045 100644 --- a/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java +++ b/modules/spring/src/test/java/org/apache/ignite/testsuites/IgniteSpringTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.cache.spring.GridSpringCacheManagerMultiJvmSelfTest; import org.apache.ignite.cache.spring.GridSpringCacheManagerSelfTest; @@ -57,51 +58,51 @@ public class IgniteSpringTestSuite extends TestSuite { public static TestSuite suite() throws Exception { TestSuite suite = new IgniteTestSuite("Spring Test Suite"); - suite.addTestSuite(GridSpringBeanSerializationSelfTest.class); - suite.addTestSuite(IgniteSpringBeanTest.class); - suite.addTestSuite(GridFactorySelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpringBeanSerializationSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSpringBeanTest.class)); + suite.addTest(new JUnit4TestAdapter(GridFactorySelfTest.class)); suite.addTest(IgniteResourceSelfTestSuite.suite()); - suite.addTestSuite(IgniteExcludeInConfigurationTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteExcludeInConfigurationTest.class)); // Tests moved to this suite since they require Spring functionality. - suite.addTestSuite(GridP2PUserVersionChangeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridP2PUserVersionChangeSelfTest.class)); - suite.addTestSuite(GridSpringCacheManagerSelfTest.class); - suite.addTestSuite(GridSpringCacheManagerSpringBeanSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerSpringBeanSelfTest.class)); - suite.addTestSuite(IgniteDynamicCacheConfigTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteDynamicCacheConfigTest.class)); - suite.addTestSuite(IgniteStartFromStreamConfigurationTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteStartFromStreamConfigurationTest.class)); - suite.addTestSuite(CacheSpringStoreSessionListenerSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheSpringStoreSessionListenerSelfTest.class)); - suite.addTestSuite(CacheJdbcBlobStoreFactorySelfTest.class); - suite.addTestSuite(CacheJdbcPojoStoreFactorySelfTest.class); - suite.addTestSuite(CachePojoStoreXmlSelfTest.class); - suite.addTestSuite(CachePojoStoreXmlWithSqlEscapeSelfTest.class); + suite.addTest(new JUnit4TestAdapter(CacheJdbcBlobStoreFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CacheJdbcPojoStoreFactorySelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePojoStoreXmlSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(CachePojoStoreXmlWithSqlEscapeSelfTest.class)); - suite.addTestSuite(GridSpringTransactionManagerSelfTest.class); - suite.addTestSuite(GridSpringTransactionManagerSpringBeanSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridSpringTransactionManagerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringTransactionManagerSpringBeanSelfTest.class)); - suite.addTestSuite(GridServiceInjectionSpringResourceTest.class); - suite.addTestSuite(IgniteSpringBeanSpringResourceInjectionTest.class); + suite.addTest(new JUnit4TestAdapter(GridServiceInjectionSpringResourceTest.class)); + suite.addTest(new JUnit4TestAdapter(IgniteSpringBeanSpringResourceInjectionTest.class)); - suite.addTestSuite(GridTransformSpringInjectionSelfTest.class); + suite.addTest(new JUnit4TestAdapter(GridTransformSpringInjectionSelfTest.class)); - suite.addTestSuite(SpringCacheManagerContextInjectionTest.class); - suite.addTestSuite(SpringTransactionManagerContextInjectionTest.class); + suite.addTest(new JUnit4TestAdapter(SpringCacheManagerContextInjectionTest.class)); + suite.addTest(new JUnit4TestAdapter(SpringTransactionManagerContextInjectionTest.class)); - suite.addTestSuite(SpringCacheTest.class); + suite.addTest(new JUnit4TestAdapter(SpringCacheTest.class)); - suite.addTestSuite(SpringEncryptedCacheRestartTest.class); - suite.addTestSuite(SpringEncryptedCacheRestartClientTest.class); + suite.addTest(new JUnit4TestAdapter(SpringEncryptedCacheRestartTest.class)); + suite.addTest(new JUnit4TestAdapter(SpringEncryptedCacheRestartClientTest.class)); - //suite.addTestSuite(GridSpringCacheManagerMultiJvmSelfTest.class); - suite.addTestSuite(GridSpringCacheManagerMultiJvmSelfTest.class); + //suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerMultiJvmSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridSpringCacheManagerMultiJvmSelfTest.class)); - suite.addTestSuite(GridCommandLineLoaderTest.class); + suite.addTest(new JUnit4TestAdapter(GridCommandLineLoaderTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java index 8a4e448..055c7de 100644 --- a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/GridSpringTransactionManagerAbstractTest.java @@ -20,12 +20,16 @@ package org.apache.ignite.transactions.spring; import org.apache.ignite.IgniteCache; 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 org.springframework.transaction.IllegalTransactionStateException; import org.springframework.transaction.InvalidIsolationLevelException; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; +@RunWith(JUnit4.class) public abstract class GridSpringTransactionManagerAbstractTest extends GridCommonAbstractTest { /** */ @@ -48,6 +52,7 @@ public abstract class GridSpringTransactionManagerAbstractTest extends GridCommo } /** */ + @Test public void testSuccessPut() { int entryCnt = 1_000; @@ -57,6 +62,7 @@ public abstract class GridSpringTransactionManagerAbstractTest extends GridCommo } /** */ + @Test public void testFailPut() { int entryCnt = 1_000; @@ -72,6 +78,7 @@ public abstract class GridSpringTransactionManagerAbstractTest extends GridCommo } /** */ + @Test public void testMandatoryPropagation() { try { service().putWithMandatoryPropagation(cache()); @@ -84,6 +91,7 @@ public abstract class GridSpringTransactionManagerAbstractTest extends GridCommo } /** */ + @Test public void testUnsupportedIsolationLevel() { try { service().putWithUnsupportedIsolationLevel(cache()); @@ -98,6 +106,7 @@ public abstract class GridSpringTransactionManagerAbstractTest extends GridCommo /** * @throws Exception If test failed. */ + @Test public void testDoSetRollbackOnlyInExistingTransaction() throws Exception { SpringTransactionManager mngr = new SpringTransactionManager(); mngr.setIgniteInstanceName(grid().name()); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java ---------------------------------------------------------------------- diff --git a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java index 8c014a9..247c7a6 100644 --- a/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java +++ b/modules/spring/src/test/java/org/apache/ignite/transactions/spring/SpringTransactionManagerContextInjectionTest.java @@ -23,6 +23,9 @@ import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgnitionEx; import org.apache.ignite.lifecycle.LifecycleBean; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import org.springframework.beans.factory.BeanFactory; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -31,10 +34,12 @@ import org.springframework.context.annotation.Configuration; /** * */ +@RunWith(JUnit4.class) public class SpringTransactionManagerContextInjectionTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testBeanInjectionUsingConfigPath() throws Exception { BeanFactory factory = new AnnotationConfigApplicationContext(TestPathConfiguration.class); @@ -56,6 +61,7 @@ public class SpringTransactionManagerContextInjectionTest extends GridCommonAbst /** * @throws Exception If failed. */ + @Test public void testBeanInjectionUsingConfig() throws Exception { BeanFactory factory = new AnnotationConfigApplicationContext(TestCfgConfiguration.class); @@ -122,4 +128,4 @@ public class SpringTransactionManagerContextInjectionTest extends GridCommonAbst return new TestInjectionLifecycleBean(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java index 7962576..b8883f6 100644 --- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java +++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteNodeStartUtilsSelfTest.java @@ -23,6 +23,9 @@ import java.util.Map; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgniteBiTuple; 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.internal.util.nodestart.IgniteNodeStartUtils.CFG; import static org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.HOST; @@ -38,10 +41,12 @@ import static org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.par /** * Tests for {@link org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils}. */ +@RunWith(JUnit4.class) public class IgniteNodeStartUtilsSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testParseFile() throws Exception { File file = U.resolveIgnitePath("modules/core/src/test/config/start-nodes.ini"); @@ -94,4 +99,4 @@ public class IgniteNodeStartUtilsSelfTest extends GridCommonAbstractTest { assert "cfg3".equals(dflts.get(CFG)); assert "script3".equals(dflts.get(SCRIPT)); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java index 9ede98e..2d8728f 100644 --- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java +++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteProjectionStartStopRestartSelfTest.java @@ -45,6 +45,9 @@ import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.Nullable; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; @@ -72,6 +75,7 @@ import static org.apache.ignite.internal.util.nodestart.IgniteNodeStartUtils.UNA * credentials.</p> */ @SuppressWarnings("ConstantConditions") +@RunWith(JUnit4.class) public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstractTest { /** */ private static final String SSH_UNAME = getProperty("test.ssh.username", "ssh.username"); @@ -206,6 +210,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartOneNode() throws Exception { joinedLatch = new CountDownLatch(1); @@ -234,6 +239,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartThreeNodes() throws Exception { joinedLatch = new CountDownLatch(3); @@ -262,6 +268,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartThreeNodesAndDoEmptyCall() throws Exception { joinedLatch = new CountDownLatch(3); @@ -287,6 +294,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartThreeNodesAndTryToStartOneNode() throws Exception { joinedLatch = new CountDownLatch(3); @@ -310,6 +318,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartFiveNodesInTwoCalls() throws Exception { joinedLatch = new CountDownLatch(3); @@ -344,6 +353,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartFiveWithTwoSpecs() throws Exception { joinedLatch = new CountDownLatch(5); @@ -373,6 +383,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStartThreeNodesAndRestart() throws Exception { joinedLatch = new CountDownLatch(3); @@ -409,6 +420,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testCustomScript() throws Exception { joinedLatch = new CountDownLatch(1); @@ -443,6 +455,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStopNodes() throws Exception { joinedLatch = new CountDownLatch(3); @@ -476,6 +489,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStopNodesFiltered() throws Exception { joinedLatch = new CountDownLatch(2); @@ -531,6 +545,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStopNodeById() throws Exception { joinedLatch = new CountDownLatch(3); @@ -548,6 +563,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testStopNodesByIds() throws Exception { joinedLatch = new CountDownLatch(3); @@ -572,6 +588,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testRestartNodes() throws Exception { joinedLatch = new CountDownLatch(3); @@ -591,6 +608,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testRestartNodesFiltered() throws Exception { joinedLatch = new CountDownLatch(2); @@ -649,6 +667,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testRestartNodeById() throws Exception { joinedLatch = new CountDownLatch(3); @@ -668,6 +687,7 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract /** * @throws Exception If failed. */ + @Test public void testRestartNodesByIds() throws Exception { joinedLatch = new CountDownLatch(3); @@ -803,4 +823,4 @@ public class IgniteProjectionStartStopRestartSelfTest extends GridCommonAbstract return GridTestProperties.getProperty(gridTestName); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java index 2967131..0f9fe9c 100644 --- a/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java +++ b/modules/ssh/src/test/java/org/apache/ignite/internal/IgniteStartStopRestartTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.internal; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,14 +26,13 @@ import junit.framework.TestSuite; public class IgniteStartStopRestartTestSuite { /** * @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("Start Nodes Test Suite"); - suite.addTestSuite(IgniteNodeStartUtilsSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteNodeStartUtilsSelfTest.class)); - suite.addTestSuite(IgniteProjectionStartStopRestartSelfTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteProjectionStartStopRestartSelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java index 25546e5..638d729 100644 --- a/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java +++ b/modules/storm/src/test/java/org/apache/ignite/stream/storm/IgniteStormStreamerSelfTestSuite.java @@ -17,21 +17,20 @@ package org.apache.ignite.stream.storm; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** * Apache Storm streamer tests. */ public class IgniteStormStreamerSelfTestSuite 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 Storm streamer Test Suite"); - suite.addTest(new TestSuite(StormIgniteStreamerSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(StormIgniteStreamerSelfTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java b/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java index b5295ad..9d9a1c4 100644 --- a/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java +++ b/modules/storm/src/test/java/org/apache/ignite/stream/storm/StormIgniteStreamerSelfTest.java @@ -42,12 +42,16 @@ import org.apache.storm.testing.TestJob; import org.apache.storm.topology.TopologyBuilder; import org.apache.storm.tuple.Values; import org.jetbrains.annotations.NotNull; +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 for {@link StormStreamer}. */ +@RunWith(JUnit4.class) public class StormIgniteStreamerSelfTest extends GridCommonAbstractTest { /** Cache name. */ private static final String TEST_CACHE = "testCache"; @@ -81,6 +85,7 @@ public class StormIgniteStreamerSelfTest extends GridCommonAbstractTest { * @throws TimeoutException * @throws InterruptedException */ + @Test public void testStormStreamerIgniteBolt() throws TimeoutException, InterruptedException { final StormStreamer<String, String> stormStreamer = new StormStreamer<>(); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java ---------------------------------------------------------------------- diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java index 2210a27..a3c9073 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTest.java @@ -31,6 +31,9 @@ import org.apache.ignite.events.CacheEvent; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.junit.Rule; +import org.junit.Test; +import org.junit.internal.runners.JUnit38ClassRunner; +import org.junit.runner.RunWith; import twitter4j.Status; import twitter4j.TwitterException; import twitter4j.TwitterObjectFactory; @@ -44,8 +47,8 @@ import static org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT; /** * Test for {@link TwitterStreamer}. Tests Public Status streaming API https://dev.twitter.com/streaming/public. */ +@RunWith(JUnit38ClassRunner.class) public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { - /** Cache entries count. */ private static final int CACHE_ENTRY_COUNT = 100; @@ -83,7 +86,7 @@ public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { } /** {@inheritDoc} */ - public void afterTest() throws Exception { + @Override public void afterTest() throws Exception { stopAllGrids(); mockServer.stop(); @@ -92,6 +95,7 @@ public class IgniteTwitterStreamerTest extends GridCommonAbstractTest { /** * @throws Exception Test exception. */ + @Test public void testStatusesFilterEndpointOAuth1() throws Exception { try (IgniteDataStreamer<Long, String> dataStreamer = grid().dataStreamer(DEFAULT_CACHE_NAME)) { TwitterStreamerImpl streamer = newStreamerInstance(dataStreamer); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java index e07aaec..7f17a46 100644 --- a/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java +++ b/modules/twitter/src/test/java/org/apache/ignite/stream/twitter/IgniteTwitterStreamerTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.stream.twitter; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; /** @@ -25,12 +26,11 @@ import junit.framework.TestSuite; public class IgniteTwitterStreamerTestSuite extends TestSuite { /** * @return Twitter streamer tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Twitter streamed Test Suite"); - suite.addTestSuite(IgniteTwitterStreamerTest.class); + suite.addTest(new JUnit4TestAdapter(IgniteTwitterStreamerTest.class)); return suite; } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java index 22cfc56..2f22f86 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/internal/GridTaskUriDeploymentDeadlockSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.lang.IgnitePredicate; import org.apache.ignite.spi.deployment.uri.UriDeploymentSpi; 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_NODE_JOINED; @@ -36,6 +39,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_JOINED; /** * Test to reproduce gg-2852. */ +@RunWith(JUnit4.class) public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTest { /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { @@ -63,6 +67,7 @@ public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTes /** * @throws Exception If failed. */ + @Test public void testDeadlock() throws Exception { try { Ignite g = startGrid(1); @@ -100,4 +105,4 @@ public class GridTaskUriDeploymentDeadlockSelfTest extends GridCommonAbstractTes stopAllGrids(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java index c514a94..65147b7 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/p2p/GridP2PDisabledSelfTest.java @@ -29,6 +29,9 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.spi.deployment.uri.UriDeploymentSpi; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.apache.ignite.testframework.junits.common.GridCommonTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test what happens if peer class loading is disabled. @@ -38,6 +41,7 @@ import org.apache.ignite.testframework.junits.common.GridCommonTest; */ @SuppressWarnings({"ProhibitedExceptionDeclared"}) @GridCommonTest(group = "P2P") +@RunWith(JUnit4.class) public class GridP2PDisabledSelfTest extends GridCommonAbstractTest { /** Task name. */ private static final String TASK_NAME = "org.apache.ignite.tests.p2p.P2PTestTaskExternalPath1"; @@ -172,6 +176,7 @@ public class GridP2PDisabledSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testGarPrivateMode() throws Exception { depMode = DeploymentMode.PRIVATE; @@ -183,6 +188,7 @@ public class GridP2PDisabledSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testGarIsolatedMode() throws Exception { depMode = DeploymentMode.ISOLATED; @@ -194,6 +200,7 @@ public class GridP2PDisabledSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testGarContinuousMode() throws Exception { depMode = DeploymentMode.CONTINUOUS; @@ -205,6 +212,7 @@ public class GridP2PDisabledSelfTest extends GridCommonAbstractTest { * * @throws Exception if error occur. */ + @Test public void testGarSharedMode() throws Exception { depMode = DeploymentMode.SHARED; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java index f4265b9..80b7016 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderMultiThreadedSelfTest.java @@ -23,14 +23,19 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.config.GridTestProperties; 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; /** * Grid URI deployment class loader self test. */ +@RunWith(JUnit4.class) public class GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommonAbstractTest { /** * @throws Exception If failed. */ + @Test public void testMultiThreadedClassLoading() throws Exception { for (int i = 0; i < 50; i++) doTest(); @@ -70,4 +75,4 @@ public class GridUriDeploymentClassLoaderMultiThreadedSelfTest extends GridCommo 500 ); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java index caa4851..33ba125 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassLoaderSelfTest.java @@ -25,15 +25,20 @@ import org.apache.ignite.spi.deployment.DeploymentResource; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Grid URI deployment class loader test. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentClassLoaderSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testNestedJarClassloading() throws Exception { ClassLoader ldr = getGarClassLoader(); @@ -44,6 +49,7 @@ public class GridUriDeploymentClassLoaderSelfTest extends GridUriDeploymentAbstr /** * @throws Exception If failed. */ + @Test public void testClasspathResourceLoading() throws Exception { ClassLoader ldr = getGarClassLoader(); @@ -73,4 +79,4 @@ public class GridUriDeploymentClassLoaderSelfTest extends GridUriDeploymentAbstr return Collections.singletonList(GridTestProperties.getProperty("ant.urideployment.gar.uri"). replace("EXTDATA", U.resolveIgnitePath("modules/extdata").getAbsolutePath())); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java index b4b6bb2..c6105e9 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentClassloaderRegisterSelfTest.java @@ -36,11 +36,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test for classloader registering. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentClassloaderRegisterSelfTest extends GridSpiAbstractTest<UriDeploymentSpi> { /** */ private static Map<ClassLoader, Set<Class<? extends ComputeTask<?, ?>>>> tasks = @@ -87,6 +91,7 @@ public class GridUriDeploymentClassloaderRegisterSelfTest extends GridSpiAbstrac /** * @throws Exception If failed. */ + @Test public void testDeploy() throws Exception { Class<? extends ComputeTask<?, ?>> task = GridFileDeploymentTestTask.class; @@ -111,6 +116,7 @@ public class GridUriDeploymentClassloaderRegisterSelfTest extends GridSpiAbstrac /** * @throws Exception If failed. */ + @Test public void testRedeploy() throws Exception { // Test non-versioned redeploy. Class<? extends ComputeTask<?, ?>> t1 = GridFileDeploymentTestTask.class; @@ -151,4 +157,4 @@ public class GridUriDeploymentClassloaderRegisterSelfTest extends GridSpiAbstrac return null; } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java index 2dc6e9e..2864b4d 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentConfigSelfTest.java @@ -20,18 +20,23 @@ package org.apache.ignite.spi.deployment.uri; import java.util.Collections; 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; /** * */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentConfigSelfTest extends GridSpiAbstractConfigTest<UriDeploymentSpi> { /** * @throws Exception If failed. */ + @Test public void testNegativeConfig() throws Exception { checkNegativeSpiProperty(new UriDeploymentSpi(), "uriList", null); checkNegativeSpiProperty(new UriDeploymentSpi(), "uriList", Collections.singletonList("qwertyuiop"), false); checkNegativeSpiProperty(new UriDeploymentSpi(), "uriList", Collections.singletonList(null), false); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java index 2d0e7e6..4492100 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentFileProcessorSelfTest.java @@ -26,15 +26,20 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; import org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask; import org.apache.tools.ant.Project; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testTaskCorrect() throws Exception { proceedTest("correct.gar", "ignite.xml", "org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0", true); @@ -43,6 +48,7 @@ public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbs /** * @throws Exception If failed. */ + @Test public void testTaskWithBrokenXML() throws Exception { proceedTest("broken.gar", "ignite.brokenxml", "brokenxml-task", false); } @@ -50,6 +56,7 @@ public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbs /** * @throws Exception If failed. */ + @Test public void testTaskWithEmptyXML() throws Exception { proceedTest("empty.gar", "ignite.empty", "emptyxml-task", false); } @@ -57,6 +64,7 @@ public class GridUriDeploymentFileProcessorSelfTest extends GridUriDeploymentAbs /** * @throws Exception If failed. */ + @Test public void testTaskWithIncorrectRefsXML() throws Exception { proceedTest("incorrefs.gar", "ignite.incorrefs", "incorrectref-task", false); } http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java index 126e202..74512ec 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMd5CheckSelfTest.java @@ -28,11 +28,15 @@ import org.apache.ignite.spi.deployment.DeploymentResource; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Redundancy for URI deployment test */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentMd5CheckSelfTest extends GridUriDeploymentAbstractSelfTest { /** * Used to count number of unit undeployments. @@ -44,6 +48,7 @@ public class GridUriDeploymentMd5CheckSelfTest extends GridUriDeploymentAbstract * * @throws Exception if failed. */ + @Test public void testMd5FileCheck() throws Exception { undeployCntr.set(0); @@ -71,6 +76,7 @@ public class GridUriDeploymentMd5CheckSelfTest extends GridUriDeploymentAbstract * * @throws Exception if failed. */ + @Test public void testMd5DirectoryCheck() throws Exception { undeployCntr.set(0); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java index 246ad80..0d96ca0 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersErrorThrottlingTest.java @@ -22,15 +22,20 @@ import java.util.List; import org.apache.ignite.internal.util.typedef.internal.LT; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests error and warn messages throttling. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentMultiScannersErrorThrottlingTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testThrottling() throws Exception { LT.throttleTimeout(11000); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java index 1561ab4..5263b57 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentMultiScannersSelfTest.java @@ -23,15 +23,20 @@ import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test URI deployment with multiple scanners. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentMultiScannersSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @throws Exception If failed. */ + @Test public void testDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0"); } @@ -52,4 +57,4 @@ public class GridUriDeploymentMultiScannersSelfTest extends GridUriDeploymentAbs return uriList; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java index acd40f5..1d4c5b3 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/GridUriDeploymentSimpleSelfTest.java @@ -33,11 +33,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDeploymentSpi> { /** * @return List of URI to use as deployment source. @@ -52,6 +56,7 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl /** * @throws Exception If failed. */ + @Test public void testSimpleDeploy() throws Exception { UriDeploymentSpi spi = getSpi(); @@ -71,6 +76,7 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl /** * @throws Exception If failed. */ + @Test public void testSimpleRedeploy() throws Exception { for (int i = 0; i < 100; i++) testSimpleDeploy(); @@ -79,6 +85,7 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl /** * @throws Exception If failed. */ + @Test public void testSimpleDeployWithName() throws Exception { UriDeploymentSpi spi = getSpi(); @@ -98,6 +105,7 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl /** * @throws Exception If failed. */ + @Test public void testSimpleRedeployWithName() throws Exception { for (int i = 0; i < 100; i++) testSimpleDeployWithName(); @@ -106,6 +114,7 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl /** * @throws Exception If failed. */ + @Test public void testSimpleDeployTwoTasks() throws Exception { UriDeploymentSpi spi = getSpi(); @@ -135,6 +144,7 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl /** * @throws Exception If failed. */ + @Test public void testSimpleRedeployTwoTasks() throws Exception { for (int i = 0; i < 100; i++) testSimpleDeployTwoTasks(); @@ -182,4 +192,4 @@ public class GridUriDeploymentSimpleSelfTest extends GridSpiAbstractTest<UriDepl return results.get(0).getData(); } } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java index d307a32..dca5507 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentSelfTest.java @@ -24,11 +24,15 @@ import org.apache.ignite.spi.deployment.uri.UriDeploymentSpi; import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test file protocol scanner. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTest { /** * @return List of URI to use as deployment source. @@ -43,6 +47,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testDeploymentFromFolder() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask0"); checkTask("GridUriDeploymentTestWithNameTask0"); @@ -53,6 +58,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testDeploymentFromFile() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3"); checkTask("GridUriDeploymentTestWithNameTask3"); @@ -70,6 +76,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testNoDescriptorDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask4"); checkTask("GridUriDeploymentTestWithNameTask4"); @@ -85,6 +92,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testBadDeployment() throws Exception { checkNoTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentAbstractTestTask"); @@ -109,6 +117,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testDependenceDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask1"); getSpi().findResource("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask1") @@ -128,6 +137,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testNoDescriptorDependenceDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask2"); getSpi().findResource("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask2") @@ -148,6 +158,7 @@ public class GridFileDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes * * @throws Exception If failed. */ + @Test public void testSignedDeployment() throws Exception { checkTask("org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask5"); checkTask("GridUriDeploymentTestWithNameTask5"); http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java index 843d809..9dea59f 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/file/GridFileDeploymentUndeploySelfTest.java @@ -27,11 +27,15 @@ import org.apache.ignite.testframework.config.GridTestProperties; import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest; import org.apache.ignite.testframework.junits.spi.GridSpiTest; import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Tests correct task undeployment after source file removing. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest<UriDeploymentSpi> { /** */ private static String tmpDirPath = System.getProperty("java.io.tmpdir") + '/' + UUID.randomUUID(); @@ -57,6 +61,7 @@ public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest<UriD /** * @throws Exception If failed. */ + @Test public void testUndeployGarFile() throws Exception { String garFilePath = U.resolveIgnitePath(GridTestProperties.getProperty("ant.urideployment.gar.file")).getPath(); @@ -108,4 +113,4 @@ public class GridFileDeploymentUndeploySelfTest extends GridSpiAbstractTest<UriD public List<String> getUriList() { return Collections.singletonList("file:///" + tmpDirPath); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java index 333f707..457ea70 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/spi/deployment/uri/scanners/http/GridHttpDeploymentSelfTest.java @@ -30,11 +30,15 @@ import org.apache.ignite.testframework.junits.spi.GridSpiTestConfig; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; import org.eclipse.jetty.server.handler.ResourceHandler; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; /** * Test http scanner. */ @GridSpiTest(spi = UriDeploymentSpi.class, group = "Deployment SPI") +@RunWith(JUnit4.class) public class GridHttpDeploymentSelfTest extends GridUriDeploymentAbstractSelfTest { /** Frequency */ private static final int FREQ = 5000; @@ -107,6 +111,7 @@ public class GridHttpDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testDeployUndeploy2Files() throws Exception { String taskName = "org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3"; @@ -133,6 +138,7 @@ public class GridHttpDeploymentSelfTest extends GridUriDeploymentAbstractSelfTes /** * @throws Exception If failed. */ + @Test public void testSameContantFiles() throws Exception { String taskName = "org.apache.ignite.spi.deployment.uri.tasks.GridUriDeploymentTestTask3"; http://git-wip-us.apache.org/repos/asf/ignite/blob/c5197e0a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java ---------------------------------------------------------------------- diff --git a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java index 4c5439e..37d6e7c 100644 --- a/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java +++ b/modules/urideploy/src/test/java/org/apache/ignite/testsuites/IgniteToolsSelfTestSuite.java @@ -17,6 +17,7 @@ package org.apache.ignite.testsuites; +import junit.framework.JUnit4TestAdapter; import junit.framework.TestSuite; import org.apache.ignite.tools.GridToolsSelfTest; @@ -26,13 +27,12 @@ import org.apache.ignite.tools.GridToolsSelfTest; public class IgniteToolsSelfTestSuite extends TestSuite { /** * @return Grid ant tasks tests suite. - * @throws Exception If failed. */ - public static TestSuite suite() throws Exception { + public static TestSuite suite() { TestSuite suite = new TestSuite("Ignite Ant Tasks Test Suite"); - suite.addTest(new TestSuite(GridToolsSelfTest.class)); + suite.addTest(new JUnit4TestAdapter(GridToolsSelfTest.class)); return suite; } -} \ No newline at end of file +}
