Fixed test on slow servers

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1387171 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Claus Ibsen 2012-09-18 14:05:06 +00:00
parent 577952be49
commit 4a0bc68b01
2 changed files with 7 additions and 4 deletions

View File

@ -69,7 +69,7 @@ public class NetworkRestartTest extends TestSupport {
localProducer.send(localSession.createTextMessage("after"));
Message after = remoteConsumer.receive(1000);
Message after = remoteConsumer.receive(3000);
assertNotNull(after);
assertEquals("after", ((TextMessage)after).getText());
@ -104,7 +104,7 @@ public class NetworkRestartTest extends TestSupport {
localProducer.send(localSession.createTextMessage("after"));
Message after = remoteConsumer.receive(1000);
Message after = remoteConsumer.receive(3000);
assertNotNull(after);
assertEquals("after", ((TextMessage)after).getText());
}

View File

@ -16,6 +16,9 @@
*/
package org.apache.activemq.usecases;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
import java.util.HashSet;
import java.util.Vector;
@ -56,7 +59,7 @@ public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupp
public boolean keepDurableSubsActive = true;
private BrokerService broker;
private ActiveMQTopic topic;
private Vector<Throwable> exceptions = new Vector<Throwable>();
private List<Throwable> exceptions = new ArrayList<Throwable>();
protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://" + getName(true));
@ -1661,7 +1664,7 @@ public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupp
}
executorService.shutdown();
executorService.awaitTermination(10, TimeUnit.MINUTES);
assertTrue("No exceptions " + exceptions.elements(), exceptions.isEmpty());
assertTrue("No exceptions expected, but was: " + exceptions, exceptions.isEmpty());
}
public static class Listener implements MessageListener {