https://issues.apache.org/jira/browse/AMQ-5606 - reenable the karaf itest with the new amqp client - ActiveMQAMQPBrokerFeatureTest

This commit is contained in:
gtully 2015-04-02 16:56:10 +01:00
parent 94f1e98adc
commit 7741e02622
3 changed files with 16 additions and 14 deletions

View File

@ -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>

View File

@ -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;
}

View File

@ -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>