mirror of https://github.com/apache/activemq.git
Move to v 0.30 of the QPid JMS client. Allow the CI tests to exercise these to see what might be broken.
This commit is contained in:
parent
23052aa986
commit
7bafa7da50
|
@ -27,6 +27,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.DeliveryMode;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
|
@ -46,7 +47,6 @@ import org.apache.activemq.transport.amqp.joram.ActiveMQAdmin;
|
|||
import org.apache.activemq.util.Wait;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.objectweb.jtests.jms.framework.TestConfig;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -791,8 +791,11 @@ public class JMSClientTest extends JMSClientTestSupport {
|
|||
called.countDown();
|
||||
}
|
||||
});
|
||||
//This makes sure the connection is completely up and connected
|
||||
s.createTemporaryQueue().delete();
|
||||
|
||||
// This makes sure the connection is completely up and connected
|
||||
Destination destination = s.createTemporaryQueue();
|
||||
MessageProducer producer = s.createProducer(destination);
|
||||
assertNotNull(producer);
|
||||
|
||||
stopBroker();
|
||||
|
||||
|
@ -966,7 +969,6 @@ public class JMSClientTest extends JMSClientTestSupport {
|
|||
}
|
||||
}
|
||||
|
||||
@Ignore("Requires version 0.30 or higher to work.") // TODO
|
||||
@Test(timeout=30000)
|
||||
public void testDurableConsumerUnsubscribeWhileActive() throws Exception {
|
||||
ActiveMQAdmin.enableJMSFrameTracing();
|
||||
|
|
|
@ -16,13 +16,6 @@
|
|||
*/
|
||||
package org.apache.activemq.transport.amqp;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
|
||||
import org.junit.After;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
@ -30,6 +23,14 @@ import java.util.concurrent.Future;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.spring.SpringSslContext;
|
||||
import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
|
||||
import org.junit.After;
|
||||
|
||||
public class JMSClientTestSupport extends AmqpTestSupport {
|
||||
|
||||
protected Connection connection;
|
||||
|
@ -96,6 +97,14 @@ public class JMSClientTestSupport extends AmqpTestSupport {
|
|||
LOG.debug("Creating connection on port {}", brokerPort);
|
||||
final ConnectionFactoryImpl factory = new ConnectionFactoryImpl("localhost", brokerPort, "admin", "password", null, useSsl);
|
||||
|
||||
if (useSsl) {
|
||||
SpringSslContext context = (SpringSslContext) brokerService.getSslContext();
|
||||
factory.setKeyStorePath(context.getKeyStore());
|
||||
factory.setKeyStorePassword("password");
|
||||
factory.setTrustStorePath(context.getTrustStore());
|
||||
factory.setTrustStorePassword("password");
|
||||
}
|
||||
|
||||
factory.setSyncPublish(syncPublish);
|
||||
factory.setTopicPrefix("topic://");
|
||||
factory.setQueuePrefix("queue://");
|
||||
|
|
|
@ -29,6 +29,7 @@ import javax.jms.MessageProducer;
|
|||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.spring.SpringSslContext;
|
||||
import org.apache.activemq.transport.amqp.AmqpTestSupport;
|
||||
import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
|
||||
import org.apache.qpid.amqp_1_0.jms.impl.QueueImpl;
|
||||
|
@ -75,6 +76,15 @@ public class AMQ4753Test extends AmqpTestSupport {
|
|||
private Connection createAMQPConnection(int testPort, boolean useSSL) throws JMSException {
|
||||
LOG.debug("In createConnection using port {} ssl? {}", testPort, useSSL);
|
||||
final ConnectionFactoryImpl connectionFactory = new ConnectionFactoryImpl("localhost", testPort, "admin", "password", null, useSSL);
|
||||
|
||||
if (useSSL) {
|
||||
SpringSslContext sslContext = (SpringSslContext) brokerService.getSslContext();
|
||||
connectionFactory.setKeyStorePath(sslContext.getKeyStore());
|
||||
connectionFactory.setKeyStorePassword("password");
|
||||
connectionFactory.setTrustStorePath(sslContext.getTrustStore());
|
||||
connectionFactory.setTrustStorePassword("password");
|
||||
}
|
||||
|
||||
final Connection connection = connectionFactory.createConnection();
|
||||
connection.setExceptionListener(new ExceptionListener() {
|
||||
@Override
|
||||
|
|
|
@ -16,20 +16,21 @@
|
|||
*/
|
||||
package org.apache.activemq.transport.amqp.joram;
|
||||
|
||||
import org.apache.activemq.broker.TransportConnector;
|
||||
import org.apache.activemq.spring.SpringSslContext;
|
||||
import org.apache.activemq.transport.amqp.DefaultTrustManager;
|
||||
import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import java.io.File;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.naming.NamingException;
|
||||
import javax.net.ssl.KeyManager;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import java.io.File;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
import org.apache.activemq.broker.TransportConnector;
|
||||
import org.apache.activemq.spring.SpringSslContext;
|
||||
import org.apache.activemq.transport.amqp.DefaultTrustManager;
|
||||
import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ActiveMQNIOPlusSSLAdmin extends ActiveMQAdmin {
|
||||
|
||||
|
@ -80,6 +81,15 @@ public class ActiveMQNIOPlusSSLAdmin extends ActiveMQAdmin {
|
|||
try {
|
||||
LOG.debug("Creating a connection factory using port {}", port);
|
||||
final ConnectionFactory factory = new ConnectionFactoryImpl("localhost", port, null, null, null, true);
|
||||
|
||||
ConnectionFactoryImpl implFactory = (ConnectionFactoryImpl) factory;
|
||||
|
||||
SpringSslContext sslContext = (SpringSslContext) broker.getSslContext();
|
||||
implFactory.setKeyStorePath(sslContext.getKeyStore());
|
||||
implFactory.setKeyStorePassword("password");
|
||||
implFactory.setTrustStorePath(sslContext.getTrustStore());
|
||||
implFactory.setTrustStorePassword("password");
|
||||
|
||||
context.bind(name, factory);
|
||||
} catch (NamingException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
@ -32,8 +32,6 @@ import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
*/
|
||||
public class ActiveMQSSLAdmin extends ActiveMQAdmin {
|
||||
|
||||
private static final String AMQP_SSL_URI = "amqp+ssl://localhost:0";
|
||||
|
@ -71,8 +69,6 @@ public class ActiveMQSSLAdmin extends ActiveMQAdmin {
|
|||
LOG.info("ssl port is {}", port);
|
||||
|
||||
broker.start();
|
||||
//broker.
|
||||
//super.startServer();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -85,6 +81,15 @@ public class ActiveMQSSLAdmin extends ActiveMQAdmin {
|
|||
try {
|
||||
LOG.debug("Creating a connection factory using port {}", port);
|
||||
final ConnectionFactory factory = new ConnectionFactoryImpl("localhost", port, null, null, null, true);
|
||||
|
||||
ConnectionFactoryImpl implFactory = (ConnectionFactoryImpl) factory;
|
||||
|
||||
SpringSslContext sslContext = (SpringSslContext) broker.getSslContext();
|
||||
implFactory.setKeyStorePath(sslContext.getKeyStore());
|
||||
implFactory.setKeyStorePassword("password");
|
||||
implFactory.setTrustStorePath(sslContext.getTrustStore());
|
||||
implFactory.setTrustStorePassword("password");
|
||||
|
||||
context.bind(name, factory);
|
||||
} catch (NamingException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -101,7 +101,7 @@
|
|||
<linkedin-zookeeper-version>1.4.0</linkedin-zookeeper-version>
|
||||
<zookeeper-version>3.4.5</zookeeper-version>
|
||||
<qpid-proton-version>0.8</qpid-proton-version>
|
||||
<qpid-jms-version>0.26</qpid-jms-version>
|
||||
<qpid-jms-version>0.30</qpid-jms-version>
|
||||
<regexp-version>1.3</regexp-version>
|
||||
<rome-version>1.0</rome-version>
|
||||
<saxon-version>9.5.1-2</saxon-version>
|
||||
|
|
Loading…
Reference in New Issue