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;
|
||||
|
||||
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;
|
||||
protected static final Logger LOG = LoggerFactory.getLogger(SimpleAMQPAuthTest.class);
|
||||
protected int port = 5672;
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(SimpleAMQPAuthTest.class);
|
||||
|
||||
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
|
||||
public void setUp() throws Exception {
|
||||
|
@ -167,6 +170,7 @@ public class SimpleAMQPAuthTest {
|
|||
public void startBroker() throws Exception {
|
||||
brokerService = createBroker();
|
||||
brokerService.start();
|
||||
port = brokerService.getTransportConnectorByName("amqp").getPublishableConnectURI().getPort();
|
||||
brokerService.waitUntilStarted();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,18 +39,18 @@
|
|||
|
||||
<transportConnectors>
|
||||
<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>
|
||||
|
||||
<plugins>
|
||||
|
||||
<simpleAuthenticationPlugin>
|
||||
<users>
|
||||
<authenticationUser username="system" password="systemPassword" groups="users,admins"/>
|
||||
<authenticationUser username="user" password="userPassword" groups="users"/>
|
||||
<authenticationUser username="guest" password="guestPassword" groups="guests"/>
|
||||
</users>
|
||||
</simpleAuthenticationPlugin>
|
||||
<simpleAuthenticationPlugin>
|
||||
<users>
|
||||
<authenticationUser username="system" password="systemPassword" groups="users,admins"/>
|
||||
<authenticationUser username="user" password="userPassword" groups="users"/>
|
||||
<authenticationUser username="guest" password="guestPassword" groups="guests"/>
|
||||
</users>
|
||||
</simpleAuthenticationPlugin>
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue