merge -c 833435 https://svn.apache.org/repos/asf/activemq/trunk - resolve intermittent failure of DiscoveryNetworkReconnectTest due to network timing issues

git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-5.3@905442 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2010-02-01 23:08:00 +00:00
parent 9ba1eb1527
commit 2c414b7417
2 changed files with 8 additions and 4 deletions

View File

@ -45,7 +45,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$
@ -96,11 +96,12 @@ public class ManagementContext implements Service {
try {
JMXConnectorServer server = connectorServer;
if (started.get() && server != null) {
LOG.debug("Starting JMXConnectorServer...");
connectorStarting.set(true);
try {
server.start();
server.start();
} finally {
connectorStarting.set(false);
connectorStarting.set(false);
}
LOG.info("JMX consoles can connect to " + server.getAddress());
}

View File

@ -202,8 +202,11 @@ public class DiscoveryNetworkReconnectTest {
// wait for the inactivity timeout and network shutdown
assertTrue("network connector mbean unregistered within 3 minute", mbeanUnregistered.tryAcquire(180, TimeUnit.SECONDS));
// whack all connections
proxy.close();
// let a reconnect succeed
proxy.goOn();
proxy.reopen();
}
}
}