mirror of https://github.com/apache/activemq.git
Test does not need JMX so disable to avoid clashing with brokers left
running by other tests.
This commit is contained in:
parent
848adc4b5d
commit
73d2810c60
|
@ -25,6 +25,7 @@ import javax.jms.Session;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
import org.apache.activemq.EmbeddedBrokerTestSupport;
|
import org.apache.activemq.EmbeddedBrokerTestSupport;
|
||||||
|
import org.apache.activemq.broker.BrokerService;
|
||||||
|
|
||||||
public class TcpTransportBindTest extends EmbeddedBrokerTestSupport {
|
public class TcpTransportBindTest extends EmbeddedBrokerTestSupport {
|
||||||
String addr = "tcp://localhost:0";
|
String addr = "tcp://localhost:0";
|
||||||
|
@ -41,6 +42,16 @@ public class TcpTransportBindTest extends EmbeddedBrokerTestSupport {
|
||||||
addr = broker.getTransportConnectors().get(0).getPublishableConnectString();
|
addr = broker.getTransportConnectors().get(0).getPublishableConnectString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected BrokerService createBroker() throws Exception {
|
||||||
|
BrokerService answer = new BrokerService();
|
||||||
|
answer.setBrokerName("TcpTransportBindTest");
|
||||||
|
answer.setPersistent(false);
|
||||||
|
answer.setUseJmx(false);
|
||||||
|
answer.addConnector(bindAddress);
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
public void testConnect() throws Exception {
|
public void testConnect() throws Exception {
|
||||||
Connection connection = new ActiveMQConnectionFactory(addr).createConnection();
|
Connection connection = new ActiveMQConnectionFactory(addr).createConnection();
|
||||||
connection.start();
|
connection.start();
|
||||||
|
|
Loading…
Reference in New Issue