mirror of https://github.com/apache/activemq.git
fix potential NPE git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1490311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c161033abb
commit
bfed9df3b7
|
@ -72,7 +72,6 @@ public class AmqpTransformerTest {
|
||||||
amqpSession.close();
|
amqpSession.close();
|
||||||
amqpConnection.close();
|
amqpConnection.close();
|
||||||
|
|
||||||
|
|
||||||
// receive with openwire JMS
|
// receive with openwire JMS
|
||||||
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:" + openwirePort);
|
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:" + openwirePort);
|
||||||
Connection openwireConn = factory.createConnection();
|
Connection openwireConn = factory.createConnection();
|
||||||
|
@ -95,7 +94,6 @@ public class AmqpTransformerTest {
|
||||||
c.close();
|
c.close();
|
||||||
session.close();
|
session.close();
|
||||||
openwireConn.close();
|
openwireConn.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(timeout = 30000)
|
@Test(timeout = 30000)
|
||||||
|
@ -120,7 +118,6 @@ public class AmqpTransformerTest {
|
||||||
amqpSession.close();
|
amqpSession.close();
|
||||||
amqpConnection.close();
|
amqpConnection.close();
|
||||||
|
|
||||||
|
|
||||||
// receive with openwire JMS
|
// receive with openwire JMS
|
||||||
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:" + openwirePort);
|
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:" + openwirePort);
|
||||||
Connection openwireConn = factory.createConnection();
|
Connection openwireConn = factory.createConnection();
|
||||||
|
@ -143,11 +140,9 @@ public class AmqpTransformerTest {
|
||||||
// headers
|
// headers
|
||||||
assertEquals(4, message.getJMSPriority());
|
assertEquals(4, message.getJMSPriority());
|
||||||
|
|
||||||
|
|
||||||
c.close();
|
c.close();
|
||||||
session.close();
|
session.close();
|
||||||
openwireConn.close();
|
openwireConn.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -171,7 +166,6 @@ public class AmqpTransformerTest {
|
||||||
amqpSession.close();
|
amqpSession.close();
|
||||||
amqpConnection.close();
|
amqpConnection.close();
|
||||||
|
|
||||||
|
|
||||||
// receive with openwire JMS
|
// receive with openwire JMS
|
||||||
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:" + openwirePort);
|
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("tcp://0.0.0.0:" + openwirePort);
|
||||||
Connection openwireConn = factory.createConnection();
|
Connection openwireConn = factory.createConnection();
|
||||||
|
@ -193,7 +187,6 @@ public class AmqpTransformerTest {
|
||||||
c.close();
|
c.close();
|
||||||
session.close();
|
session.close();
|
||||||
openwireConn.close();
|
openwireConn.close();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Connection createAmqpConnection() throws JMSException {
|
public Connection createAmqpConnection() throws JMSException {
|
||||||
|
@ -209,7 +202,6 @@ public class AmqpTransformerTest {
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void startBrokerWithAmqpTransport(String amqpUrl) throws Exception {
|
public void startBrokerWithAmqpTransport(String amqpUrl) throws Exception {
|
||||||
brokerService = new BrokerService();
|
brokerService = new BrokerService();
|
||||||
brokerService.setPersistent(false);
|
brokerService.setPersistent(false);
|
||||||
|
|
Loading…
Reference in New Issue