activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [2/3] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5606 - reenable the karaf itest with the new amqp client - ActiveMQAMQPBrokerFeatureTest
Date Fri, 03 Apr 2015 14:12:19 GMT
https://issues.apache.org/jira/browse/AMQ-5606 - reenable the karaf itest with the new amqp
client - ActiveMQAMQPBrokerFeatureTest


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

Branch: refs/heads/master
Commit: 7741e02622f97eb63d0870caefd8ad81f46248c7
Parents: 94f1e98
Author: gtully <gary.tully@gmail.com>
Authored: Thu Apr 2 16:56:10 2015 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Fri Apr 3 14:19:15 2015 +0100

----------------------------------------------------------------------
 activemq-karaf-itest/pom.xml                    |  8 +++++++-
 .../itest/ActiveMQAMQPBrokerFeatureTest.java    | 21 ++++++++------------
 pom.xml                                         |  1 +
 3 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/7741e026/activemq-karaf-itest/pom.xml
----------------------------------------------------------------------
diff --git a/activemq-karaf-itest/pom.xml b/activemq-karaf-itest/pom.xml
index 721c6db..b6a0378 100644
--- a/activemq-karaf-itest/pom.xml
+++ b/activemq-karaf-itest/pom.xml
@@ -98,7 +98,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.qpid</groupId>
-      <artifactId>proton-jms</artifactId>
+      <artifactId>proton-j</artifactId>
       <version>${qpid-proton-version}</version>
     </dependency>
     <dependency>
@@ -107,6 +107,12 @@
       <version>${qpid-jms-version}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>io.netty</groupId>
+      <artifactId>netty-all</artifactId>
+      <version>${netty-all-version}</version>
+      <scope>test</scope>
+    </dependency>
 
     <dependency>
       <groupId>org.apache.camel.karaf</groupId>

http://git-wip-us.apache.org/repos/asf/activemq/blob/7741e026/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQAMQPBrokerFeatureTest.java
----------------------------------------------------------------------
diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQAMQPBrokerFeatureTest.java
b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQAMQPBrokerFeatureTest.java
index dac4f47..f9ecba0 100644
--- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQAMQPBrokerFeatureTest.java
+++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQAMQPBrokerFeatureTest.java
@@ -27,7 +27,6 @@ import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 
-@Ignore
 @RunWith(PaxExam.class)
 public class ActiveMQAMQPBrokerFeatureTest extends ActiveMQBrokerFeatureTest {
     private static final Integer AMQP_PORT = 61636;
@@ -35,9 +34,13 @@ public class ActiveMQAMQPBrokerFeatureTest extends ActiveMQBrokerFeatureTest
{
     @Configuration
     public static Option[] configure() {
         Option[] activeMQOptions = configure("activemq");
+        Option netty = CoreOptions.wrappedBundle(CoreOptions.mavenBundle("io.netty", "netty-all").versionAsInProject().getURL().toString()
+ "$Bundle-SymbolicName=netty-all");
+        Option protonJ = CoreOptions.wrappedBundle(CoreOptions.mavenBundle("org.apache.qpid",
"proton-j").versionAsInProject().getURL().toString() + "$Bundle-SymbolicName=proton-j");
         Option qpidClient = CoreOptions.wrappedBundle(CoreOptions.mavenBundle("org.apache.qpid",
"qpid-jms-client").versionAsInProject().getURL().toString() + "$Bundle-SymbolicName=qpid-jms-client");
 
-        Option[] options = append(qpidClient, activeMQOptions);
+        Option[] options = append(protonJ, activeMQOptions);
+        options = append(netty, options);
+        options = append(qpidClient, options);
 
         Option[] configuredOptions = configureBrokerStart(options);
         return configuredOptions;
@@ -46,22 +49,14 @@ public class ActiveMQAMQPBrokerFeatureTest extends ActiveMQBrokerFeatureTest
{
     @Override
     protected Connection getConnection() throws Throwable {
 
-        String amqpURI = "amqp://localhost" + AMQP_PORT;
+        String amqpURI = "amqp://localhost:" + AMQP_PORT;
         JmsConnectionFactory factory = new JmsConnectionFactory(amqpURI);
 
         factory.setUsername(AbstractFeatureTest.USER);
         factory.setPassword(AbstractFeatureTest.PASSWORD);
 
-        Connection connection = null;
-        ClassLoader originalLoader = Thread.currentThread().getContextClassLoader();
-        try {
-            // ensure service loader uses a loader that can find the impl - not the system
classpath
-            Thread.currentThread().setContextClassLoader(factory.getClass().getClassLoader());
-            connection = factory.createConnection();
-            connection.start();
-        } finally {
-            Thread.currentThread().setContextClassLoader(originalLoader);
-        }
+        Connection connection = factory.createConnection();
+        connection.start();
         return connection;
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/7741e026/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c5ebd5d..96c761a 100755
--- a/pom.xml
+++ b/pom.xml
@@ -106,6 +106,7 @@
     <zookeeper-version>3.4.6</zookeeper-version>
     <qpid-proton-version>0.8</qpid-proton-version>
     <qpid-jms-version>0.1.0</qpid-jms-version>
+    <netty-all-version>4.0.17.Final</netty-all-version>
     <regexp-version>1.3</regexp-version>
     <rome-version>1.0</rome-version>
     <saxon-version>9.5.1-2</saxon-version>


Mime
View raw message