mirror of https://github.com/apache/activemq.git
increase the max amount of time we wait for reconnect since the default network reconnect delay could be up to 5 seconds
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@423794 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
98a6f181ca
commit
1bcd631bf9
|
@ -37,6 +37,8 @@ import org.apache.activemq.advisory.ConsumerListener;
|
|||
import org.apache.activemq.broker.BrokerFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
|
@ -48,6 +50,8 @@ import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
|
|||
*/
|
||||
public class NetworkReconnectTest extends TestCase {
|
||||
|
||||
protected static final Log log = LogFactory.getLog(NetworkReconnectTest.class);
|
||||
|
||||
private BrokerService producerBroker;
|
||||
private BrokerService consumerBroker;
|
||||
private ActiveMQConnectionFactory producerConnectionFactory;
|
||||
|
@ -182,6 +186,11 @@ public class NetworkReconnectTest extends TestCase {
|
|||
}
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
log.info("===============================================================================");
|
||||
log.info("Running Test Case: "+getName());
|
||||
log.info("===============================================================================");
|
||||
|
||||
producerConnectionFactory = createProducerConnectionFactory();
|
||||
consumerConnectionFactory = createConsumerConnectionFactory();
|
||||
destination = new ActiveMQQueue("RECONNECT.TEST.QUEUE");
|
||||
|
@ -296,7 +305,7 @@ public class NetworkReconnectTest extends TestCase {
|
|||
if( consumerCounter.get() > 0 ) {
|
||||
return;
|
||||
}
|
||||
Thread.sleep(50);
|
||||
Thread.sleep(100);
|
||||
}
|
||||
fail("The consumer did not arrive.");
|
||||
}
|
||||
|
@ -306,7 +315,7 @@ public class NetworkReconnectTest extends TestCase {
|
|||
if( consumerCounter.get() == 0 ) {
|
||||
return;
|
||||
}
|
||||
Thread.sleep(50);
|
||||
Thread.sleep(100);
|
||||
}
|
||||
fail("The consumer did not leave.");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue