Repository: camel Updated Branches: refs/heads/master 8307841d2 -> aa629b280
CAMEL-10612: added platform compatibility tests and features Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aa629b28 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aa629b28 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aa629b28 Branch: refs/heads/master Commit: aa629b280b3401823844b492a77beefc8f170644 Parents: 91926c2 Author: Nicola Ferraro <ni.ferr...@gmail.com> Authored: Mon Feb 6 10:49:20 2017 +0100 Committer: Nicola Ferraro <ni.ferr...@gmail.com> Committed: Mon Feb 6 10:49:28 2017 +0100 ---------------------------------------------------------------------- components/camel-reactive-streams/pom.xml | 5 +- parent/pom.xml | 1 + .../features/src/main/resources/features.xml | 4 ++ .../itest/karaf/CamelReactiveStreamsTest.java | 36 ++++++++++++++ .../springboot/CamelReactiveStreamsTest.java | 50 ++++++++++++++++++++ .../itest/springboot/util/LocationUtils.java | 2 +- 6 files changed, 95 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/components/camel-reactive-streams/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-reactive-streams/pom.xml b/components/camel-reactive-streams/pom.xml index 3a69a48..3d29bbc 100644 --- a/components/camel-reactive-streams/pom.xml +++ b/components/camel-reactive-streams/pom.xml @@ -32,6 +32,7 @@ <properties> <camel.osgi.export.pkg>org.apache.camel.component.reactive.streams.*</camel.osgi.export.pkg> + <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=reactive-streams</camel.osgi.export.service> </properties> <dependencies> @@ -44,14 +45,14 @@ <dependency> <groupId>org.reactivestreams</groupId> <artifactId>reactive-streams</artifactId> - <version>1.0.0</version> + <version>${reactive-streams-version}</version> </dependency> <!-- test dependencies --> <dependency> <groupId>org.reactivestreams</groupId> <artifactId>reactive-streams-tck</artifactId> - <version>1.0.0</version> + <version>${reactive-streams-version}</version> <scope>test</scope> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index c21abeb..f68623d 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -505,6 +505,7 @@ <quartz2-version>2.2.3</quartz2-version> <quickfixj-version>1.6.3</quickfixj-version> <rabbitmq-amqp-client-version>4.0.2</rabbitmq-amqp-client-version> + <reactive-streams-version>1.0.0</reactive-streams-version> <reactor-version>3.0.4.RELEASE</reactor-version> <reflections-bundle-version>0.9.10_3</reflections-bundle-version> <regexp-bundle-version>1.4_1</regexp-bundle-version> http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/platforms/karaf/features/src/main/resources/features.xml ---------------------------------------------------------------------- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index 20d52f5..c9ec945 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -1469,6 +1469,10 @@ <bundle dependency='true'>mvn:commons-pool/commons-pool/${commons-pool-version}</bundle> <bundle>mvn:org.apache.camel/camel-rabbitmq/${project.version}</bundle> </feature> + <feature name='camel-reactive-streams' version='${project.version}' resolver='(obr)' start-level='50'> + <feature version='${project.version}'>camel-core</feature> + <bundle dependency='true'>mvn:org.reactivestreams/reactive-streams/${reactive-streams-version}</bundle> + </feature> <feature name='camel-restlet' version='${project.version}' resolver='(obr)' start-level='50'> <feature version='${project.version}'>camel-core</feature> <bundle dependency='true'>mvn:commons-codec/commons-codec/${commons-codec-version}</bundle> http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java new file mode 100644 index 0000000..ad395f2 --- /dev/null +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelReactiveStreamsTest.java @@ -0,0 +1,36 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.itest.karaf; + +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +@Ignore("Not installing") +public class CamelReactiveStreamsTest extends BaseKarafTest { + + public static final String COMPONENT = extractName(CamelReactiveStreamsTest.class); + + @Test + public void test() throws Exception { + testComponent(COMPONENT); + } + + +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java new file mode 100644 index 0000000..05c9f6c --- /dev/null +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/CamelReactiveStreamsTest.java @@ -0,0 +1,50 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.itest.springboot; + +import org.apache.camel.itest.springboot.util.ArquillianPackager; +import org.apache.camel.itest.springboot.util.DependencyResolver; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit.Arquillian; +import org.jboss.shrinkwrap.api.Archive; +import org.junit.Test; +import org.junit.runner.RunWith; + + +@RunWith(Arquillian.class) +public class CamelReactiveStreamsTest extends AbstractSpringBootTestSupport { + + @Deployment + public static Archive<?> createSpringBootPackage() throws Exception { + return ArquillianPackager.springBootPackage(createTestConfig()); + } + + public static ITestConfig createTestConfig() { + return new ITestConfigBuilder() + .module(inferModuleName(CamelReactiveStreamsTest.class)) + .unitTestExclusionPattern(".*(\\.tck\\..*)") + .build(); + } + + @Test + public void componentTests() throws Exception { + this.runComponentTest(config); + this.runModuleUnitTestsIfEnabled(config); + } + + +} http://git-wip-us.apache.org/repos/asf/camel/blob/aa629b28/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java index ad23eec..0d564df 100644 --- a/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java +++ b/tests/camel-itest-spring-boot/src/test/java/org/apache/camel/itest/springboot/util/LocationUtils.java @@ -32,7 +32,7 @@ public final class LocationUtils { try { File root = new File(".").getCanonicalFile(); while (root != null) { - File[] names = root.listFiles(pathname -> pathname.getName().equals("components-starter")); + File[] names = root.listFiles(pathname -> pathname.getName().equals("camel-core")); if (names != null && names.length == 1) { break; }