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,10 +431,15 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge {
|
||||||
break;
|
break;
|
||||||
case ConsumerInfo.DATA_STRUCTURE_TYPE:
|
case ConsumerInfo.DATA_STRUCTURE_TYPE:
|
||||||
localStartedLatch.await();
|
localStartedLatch.await();
|
||||||
if (!addConsumerInfo((ConsumerInfo)command)) {
|
if (started.get()) {
|
||||||
if (LOG.isDebugEnabled()) {
|
if (!addConsumerInfo((ConsumerInfo) command)) {
|
||||||
LOG.debug("Ignoring ConsumerInfo: " + command);
|
if (LOG.isDebugEnabled()) {
|
||||||
|
LOG.debug("Ignoring ConsumerInfo: "+ command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// received a subscription whilst stopping
|
||||||
|
LOG.warn("Stopping - ignoring ConsumerInfo: "+ command);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -34,7 +34,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
public class DuplexNetworkMBeanTest extends TestCase {
|
public class DuplexNetworkMBeanTest extends TestCase {
|
||||||
|
|
||||||
protected static final Log LOG = LogFactory.getLog(DuplexNetworkMBeanTest.class);
|
protected static final Log LOG = LogFactory.getLog(DuplexNetworkMBeanTest.class);
|
||||||
protected final int numRestarts = 2;
|
protected final int numRestarts = 10;
|
||||||
|
|
||||||
protected BrokerService createBroker() throws Exception {
|
protected BrokerService createBroker() throws Exception {
|
||||||
BrokerService broker = new BrokerService();
|
BrokerService broker = new BrokerService();
|
||||||
|
@ -48,7 +48,7 @@ public class DuplexNetworkMBeanTest extends TestCase {
|
||||||
BrokerService broker = new BrokerService();
|
BrokerService broker = new BrokerService();
|
||||||
broker.setBrokerName("networkedBroker");
|
broker.setBrokerName("networkedBroker");
|
||||||
broker.addConnector("tcp://localhost:62617");
|
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);
|
networkConnector.setDuplex(true);
|
||||||
return broker;
|
return broker;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ public class DuplexNetworkMBeanTest extends TestCase {
|
||||||
for (int i=0; i<numRestarts; i++) {
|
for (int i=0; i<numRestarts; i++) {
|
||||||
broker = createBroker();
|
broker = createBroker();
|
||||||
broker.start();
|
broker.start();
|
||||||
assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 5000));
|
assertEquals(1, countMbeans(networkedBroker, "NetworkBridge", 10000));
|
||||||
assertEquals(1, countMbeans(broker, "Connection"));
|
assertEquals(1, countMbeans(broker, "Connection"));
|
||||||
|
|
||||||
broker.stop();
|
broker.stop();
|
||||||
|
|
Loading…
Reference in New Issue