mirror of https://github.com/apache/activemq.git
Use dynamic ports for the test to avoid clashing with other brokers.
This commit is contained in:
parent
025c2316d9
commit
80322ce00d
|
@ -43,10 +43,13 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class SimpleAMQPAuthTest {
|
public class SimpleAMQPAuthTest {
|
||||||
public static final String SIMPLE_AUTH_AMQP_BROKER_XML = "org/apache/activemq/transport/amqp/simple-auth-amqp-broker.xml";
|
|
||||||
public BrokerService brokerService;
|
private static final Logger LOG = LoggerFactory.getLogger(SimpleAMQPAuthTest.class);
|
||||||
protected static final Logger LOG = LoggerFactory.getLogger(SimpleAMQPAuthTest.class);
|
|
||||||
protected int port = 5672;
|
private final String SIMPLE_AUTH_AMQP_BROKER_XML =
|
||||||
|
"org/apache/activemq/transport/amqp/simple-auth-amqp-broker.xml";
|
||||||
|
private BrokerService brokerService;
|
||||||
|
private int port;
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
|
@ -167,6 +170,7 @@ public class SimpleAMQPAuthTest {
|
||||||
public void startBroker() throws Exception {
|
public void startBroker() throws Exception {
|
||||||
brokerService = createBroker();
|
brokerService = createBroker();
|
||||||
brokerService.start();
|
brokerService.start();
|
||||||
|
port = brokerService.getTransportConnectorByName("amqp").getPublishableConnectURI().getPort();
|
||||||
brokerService.waitUntilStarted();
|
brokerService.waitUntilStarted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
<transportConnectors>
|
<transportConnectors>
|
||||||
<transportConnector name="openwire" uri="vm://localhost" />
|
<transportConnector name="openwire" uri="vm://localhost" />
|
||||||
<transportConnector name="amqp" uri="amqp://0.0.0.0:5672"/>
|
<transportConnector name="amqp" uri="amqp://0.0.0.0:0"/>
|
||||||
</transportConnectors>
|
</transportConnectors>
|
||||||
|
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
Loading…
Reference in New Issue