ARTEMIS-2967 Adding testSimpleConnect back and fixing a possible NPE
This commit is contained in:
parent
caddd4fb2f
commit
480197975b
|
@ -154,9 +154,11 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
|
|||
server.getConfiguration().registerBrokerPlugin(this);
|
||||
try {
|
||||
|
||||
for (AMQPBrokerConnectionElement connectionElement : brokerConnectConfiguration.getConnectionElements()) {
|
||||
if (connectionElement.getType() == AMQPBrokerConnectionAddressType.MIRROR) {
|
||||
installMirrorController((AMQPMirrorBrokerConnectionElement)connectionElement, server);
|
||||
if (brokerConnectConfiguration != null && brokerConnectConfiguration.getConnectionElements() != null) {
|
||||
for (AMQPBrokerConnectionElement connectionElement : brokerConnectConfiguration.getConnectionElements()) {
|
||||
if (connectionElement.getType() == AMQPBrokerConnectionAddressType.MIRROR) {
|
||||
installMirrorController((AMQPMirrorBrokerConnectionElement) connectionElement, server);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
|
|
@ -54,6 +54,17 @@ public class AMQPBridgeTest extends AmqpClientTestSupport {
|
|||
return createServer(AMQP_PORT, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testsSimpleConnect() throws Exception {
|
||||
server.start();
|
||||
server_2 = createServer(AMQP_PORT_2, false);
|
||||
|
||||
AMQPBrokerConnectConfiguration amqpConnection = new AMQPBrokerConnectConfiguration("test", "tcp://localhost:" + AMQP_PORT);
|
||||
server_2.getConfiguration().addAMQPConnection(amqpConnection);
|
||||
|
||||
server_2.start();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleTransferPush() throws Exception {
|
||||
internalTransferPush("TEST", false);
|
||||
|
|
Loading…
Reference in New Issue