Repository: camel
Updated Branches:
  refs/heads/master 5cf0fc315 -> cac784543


CAMEL-8282: Use latest AMQ version in osgi jms test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cac78454
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cac78454
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cac78454

Branch: refs/heads/master
Commit: cac784543eb810d3a4dc1043112a59cf9d288262
Parents: 5cf0fc3
Author: Claus Ibsen <[email protected]>
Authored: Wed Jan 28 07:20:44 2015 +0100
Committer: Claus Ibsen <[email protected]>
Committed: Wed Jan 28 07:20:44 2015 +0100

----------------------------------------------------------------------
 .../camel/itest/osgi/OSGiIntegrationTestSupport.java |  2 +-
 .../org/apache/camel/itest/osgi/jms/JmsTest.java     | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cac78454/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
----------------------------------------------------------------------
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
index a0a31a0..b9836bb 100644
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/OSGiIntegrationTestSupport.java
@@ -88,8 +88,8 @@ public class OSGiIntegrationTestSupport extends 
CamelTestSupport {
         mavenOption.versionAsInProject().start(true).startLevel(10);
         return mavenOption;
     }
-    public static UrlReference getCamelKarafFeatureUrl(String version) {
 
+    public static UrlReference getCamelKarafFeatureUrl(String version) {
         String type = "xml/features";
         MavenArtifactProvisionOption mavenOption = 
mavenBundle().groupId("org.apache.camel.karaf").artifactId("apache-camel");
         if (version == null) {

http://git-wip-us.apache.org/repos/asf/camel/blob/cac78454/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
----------------------------------------------------------------------
diff --git 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
index d910076..fa9aa65 100644
--- 
a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
+++ 
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jms/JmsTest.java
@@ -22,8 +22,11 @@ import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.ops4j.pax.exam.options.UrlReference;
 import 
org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
 
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.OptionUtils.combine;
 
 @RunWith(PaxExam.class)
@@ -34,6 +37,16 @@ public class JmsTest extends 
OSGiIntegrationSpringTestSupport {
         return new OsgiBundleXmlApplicationContext(new 
String[]{"org/apache/camel/itest/osgi/jms/CamelContext.xml"});
     }
 
+    public static UrlReference getActiveMQKarafFeatureUrl(String version) {
+        String type = "xml/features";
+        MavenArtifactProvisionOption mavenOption = 
mavenBundle().groupId("org.apache.activemq").artifactId("activemq-karaf");
+        if (version == null) {
+            return mavenOption.versionAsInProject().type(type);
+        } else {
+            return mavenOption.version(version).type(type);
+        }
+    }
+
     @Test
     public void testJms() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
@@ -49,7 +62,7 @@ public class JmsTest extends OSGiIntegrationSpringTestSupport 
{
             getDefaultCamelKarafOptions(),
                 
             // using the features to install AMQ
-            
scanFeatures("mvn:org.apache.activemq/activemq-karaf/5.6.0/xml/features", 
"activemq"),
+            scanFeatures(getActiveMQKarafFeatureUrl("5.10.1"), "activemq"),
 
             // using the features to install the camel components
             loadCamelFeatures("camel-jms"));

Reply via email to