mirror of
https://github.com/apache/activemq.git
synced 2025-02-09 19:45:55 +00:00
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:
parent
577952be49
commit
4a0bc68b01
@ -69,7 +69,7 @@ public class NetworkRestartTest extends TestSupport {
|
|||||||
|
|
||||||
|
|
||||||
localProducer.send(localSession.createTextMessage("after"));
|
localProducer.send(localSession.createTextMessage("after"));
|
||||||
Message after = remoteConsumer.receive(1000);
|
Message after = remoteConsumer.receive(3000);
|
||||||
assertNotNull(after);
|
assertNotNull(after);
|
||||||
assertEquals("after", ((TextMessage)after).getText());
|
assertEquals("after", ((TextMessage)after).getText());
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public class NetworkRestartTest extends TestSupport {
|
|||||||
|
|
||||||
|
|
||||||
localProducer.send(localSession.createTextMessage("after"));
|
localProducer.send(localSession.createTextMessage("after"));
|
||||||
Message after = remoteConsumer.receive(1000);
|
Message after = remoteConsumer.receive(3000);
|
||||||
assertNotNull(after);
|
assertNotNull(after);
|
||||||
assertEquals("after", ((TextMessage)after).getText());
|
assertEquals("after", ((TextMessage)after).getText());
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.activemq.usecases;
|
package org.apache.activemq.usecases;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
@ -56,7 +59,7 @@ public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupp
|
|||||||
public boolean keepDurableSubsActive = true;
|
public boolean keepDurableSubsActive = true;
|
||||||
private BrokerService broker;
|
private BrokerService broker;
|
||||||
private ActiveMQTopic topic;
|
private ActiveMQTopic topic;
|
||||||
private Vector<Throwable> exceptions = new Vector<Throwable>();
|
private List<Throwable> exceptions = new ArrayList<Throwable>();
|
||||||
|
|
||||||
protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
|
protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
|
||||||
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://" + getName(true));
|
ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://" + getName(true));
|
||||||
@ -1661,7 +1664,7 @@ public class DurableSubscriptionOfflineTest extends org.apache.activemq.TestSupp
|
|||||||
}
|
}
|
||||||
executorService.shutdown();
|
executorService.shutdown();
|
||||||
executorService.awaitTermination(10, TimeUnit.MINUTES);
|
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 {
|
public static class Listener implements MessageListener {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user