mirror of https://github.com/apache/activemq.git
resolve intermittent failure of DiscoveryNetworkReconnectTest due to network timing issues
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@833435 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b3873fb3e4
commit
814c49f058
|
@ -47,7 +47,7 @@ import org.apache.commons.logging.Log;
|
|||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* A Flow provides different dispatch policies within the NMR
|
||||
* An abstraction over JMX mbean registration
|
||||
*
|
||||
* @org.apache.xbean.XBean
|
||||
* @version $Revision$
|
||||
|
@ -91,14 +91,13 @@ public class ManagementContext implements Service {
|
|||
try {
|
||||
getMBeanServer().invoke(namingServiceObjectName, "start", null, null);
|
||||
} catch (Throwable ignore) {
|
||||
LOG.debug("ignored error on start invocation", ignore);
|
||||
}
|
||||
Thread t = new Thread("JMX connector") {
|
||||
public void run() {
|
||||
try {
|
||||
JMXConnectorServer server = connectorServer;
|
||||
if (started.get() && server != null) {
|
||||
LOG.debug("Starting JMX JMXConnectorServer...");
|
||||
LOG.debug("Starting JMXConnectorServer...");
|
||||
server.start();
|
||||
LOG.info("JMX consoles can connect to " + server.getAddress());
|
||||
}
|
||||
|
|
|
@ -195,8 +195,11 @@ public class DiscoveryNetworkReconnectTest {
|
|||
// wait for the inactivity timeout and network shutdown
|
||||
assertTrue("network connector mbean unregistered within 1 minute", mbeanUnregistered.tryAcquire(60, TimeUnit.SECONDS));
|
||||
|
||||
// whack all connections
|
||||
proxy.close();
|
||||
|
||||
// let a reconnect succeed
|
||||
proxy.goOn();
|
||||
proxy.reopen();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue