mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@675484 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e233801bb3
commit
9c12a0c9b8
|
@ -431,11 +431,16 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge {
|
|||
break;
|
||||
case ConsumerInfo.DATA_STRUCTURE_TYPE:
|
||||
localStartedLatch.await();
|
||||
if (!addConsumerInfo((ConsumerInfo)command)) {
|
||||
if (started.get()) {
|
||||
if (!addConsumerInfo((ConsumerInfo) command)) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Ignoring ConsumerInfo: " + command);
|
||||
LOG.debug("Ignoring ConsumerInfo: "+ command);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// received a subscription whilst stopping
|
||||
LOG.warn("Stopping - ignoring ConsumerInfo: "+ command);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (LOG.isDebugEnabled()) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory;
|
|||
public class DuplexNetworkMBeanTest extends TestCase {
|
||||
|
||||
protected static final Log LOG = LogFactory.getLog(DuplexNetworkMBeanTest.class);
|
||||
protected final int numRestarts = 2;
|
||||
protected final int numRestarts = 10;
|
||||
|
||||
protected BrokerService createBroker() throws Exception {
|
||||
BrokerService broker = new BrokerService();
|
||||
|
@ -48,7 +48,7 @@ public class DuplexNetworkMBeanTest extends TestCase {
|
|||
BrokerService broker = new BrokerService();
|
||||
broker.setBrokerName("networkedBroker");
|
||||
broker.addConnector("tcp://localhost:62617");
|
||||
NetworkConnector networkConnector = broker.addNetworkConnector("static://tcp://localhost:61617");
|
||||
NetworkConnector networkConnector = broker.addNetworkConnector("static:(tcp://localhost:61617)?maxReconnectDelay=1000&useExponentialBackOff=false");
|
||||
networkConnector.setDuplex(true);
|
||||
return broker;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class DuplexNetworkMBeanTest extends TestCase {
|
|||
for (int i=0; i<numRestarts; i++) {
|
||||
broker = createBroker();
|
||||
broker.start();
|
||||
assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 5000));
|
||||
assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 10000));
|
||||
assertEquals(1, countMbeans(broker, "Connection"));
|
||||
|
||||
broker.stop();
|
||||
|
|
Loading…
Reference in New Issue