mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5086 - init of broker got dropped after mutex wait - testWaitFor was failing
This commit is contained in:
parent
ee08fc1e24
commit
a9b8d98ed7
|
@ -196,6 +196,7 @@ public class VMTransportFactory extends TransportFactory {
|
|||
try {
|
||||
LOG.debug("waiting for broker named: " + brokerName + " to enter registry");
|
||||
registry.getRegistryMutext().wait(timeout);
|
||||
broker = registry.lookup(brokerName);
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public class VMTransportWaitForTest {
|
|||
|
||||
// spawn a thread that will wait for an embedded broker to start via
|
||||
// vm://..
|
||||
Thread t = new Thread() {
|
||||
Thread t = new Thread("ClientConnectionThread") {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
|
@ -89,7 +89,7 @@ public class VMTransportWaitForTest {
|
|||
BrokerService broker = new BrokerService();
|
||||
broker.setPersistent(false);
|
||||
broker.start();
|
||||
assertTrue("has got connection", gotConnection.await(400, TimeUnit.MILLISECONDS));
|
||||
assertTrue("has got connection", gotConnection.await(5, TimeUnit.SECONDS));
|
||||
broker.stop();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue