mirror of https://github.com/apache/activemq.git
Fixed test which may fail
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1387600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4d48a5b59b
commit
4810be5c6e
|
@ -22,6 +22,7 @@ import java.io.ObjectInputStream;
|
|||
import java.io.ObjectOutputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
|
@ -102,20 +103,20 @@ public class ActiveMQConnectionFactoryTest extends CombinationTestSupport {
|
|||
}
|
||||
|
||||
public void testCreateVMConnectionWithEmbdeddBroker() throws URISyntaxException, JMSException {
|
||||
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
|
||||
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://myBroker2?broker.persistent=false");
|
||||
// Make sure the broker is not created until the connection is
|
||||
// instantiated.
|
||||
assertNull(BrokerRegistry.getInstance().lookup("localhost"));
|
||||
assertNull(BrokerRegistry.getInstance().lookup("myBroker2"));
|
||||
connection = (ActiveMQConnection)cf.createConnection();
|
||||
// This should create the connection.
|
||||
assertNotNull(connection);
|
||||
// Verify the broker was created.
|
||||
assertNotNull(BrokerRegistry.getInstance().lookup("localhost"));
|
||||
assertNotNull(BrokerRegistry.getInstance().lookup("myBroker2"));
|
||||
|
||||
connection.close();
|
||||
|
||||
// Verify the broker was destroyed.
|
||||
assertNull(BrokerRegistry.getInstance().lookup("localhost"));
|
||||
assertNull(BrokerRegistry.getInstance().lookup("myBroker2"));
|
||||
}
|
||||
|
||||
public void testGetBrokerName() throws URISyntaxException, JMSException {
|
||||
|
|
Loading…
Reference in New Issue