Test does not need JMX so disable to avoid clashing with brokers left

running by other tests.
This commit is contained in:
Timothy Bish 2015-06-03 13:38:01 -04:00
parent 848adc4b5d
commit 73d2810c60
1 changed files with 11 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import javax.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.EmbeddedBrokerTestSupport;
import org.apache.activemq.broker.BrokerService;
public class TcpTransportBindTest extends EmbeddedBrokerTestSupport {
String addr = "tcp://localhost:0";
@ -41,6 +42,16 @@ public class TcpTransportBindTest extends EmbeddedBrokerTestSupport {
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 {
Connection connection = new ActiveMQConnectionFactory(addr).createConnection();
connection.start();