intermittent failures on slow machines

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@956570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-06-21 13:14:06 +00:00
parent 4dd5b5efb7
commit a8b0d39915
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ implements ExceptionListener, TransportListener {
connector = broker.addConnector("tcp://localhost:0?transport.useInactivityMonitor=false");
broker.setPersistent(false);
broker.start();
broker.waitUntilStarted();
class SlowCloseSocketTcpTransportFactory extends TcpTransportFactory {
@ -130,6 +131,7 @@ implements ExceptionListener, TransportListener {
public void tearDown() throws Exception {
broker.stop();
broker.waitUntilStopped();
}
protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
@ -175,6 +177,7 @@ implements ExceptionListener, TransportListener {
LOG.info("Transport listener exception:" + error);
if (reconnectInTransportListener) {
try {
TimeUnit.MILLISECONDS.sleep(500);
makeConsumer();
} catch (Exception e) {
reconnectException = e;