mirror of https://github.com/apache/activemq.git
Allow the HTTP test to have extra time to wait for all messages to
arrive as the transmission rate is much slower.
This commit is contained in:
parent
3da9b0720e
commit
71893f1434
|
@ -16,21 +16,29 @@
|
|||
*/
|
||||
package org.apache.activemq;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.usecases.TwoBrokerTopicSendReceiveTest;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TwoBrokerTopicSendReceiveUsingHttpTest extends TwoBrokerTopicSendReceiveTest {
|
||||
|
||||
@Override
|
||||
protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException {
|
||||
return createConnectionFactory("org/apache/activemq/usecases/receiver-http.xml", "receiver", "vm://receiver");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException {
|
||||
return createConnectionFactory("org/apache/activemq/usecases/sender-http.xml", "sender", "vm://sender");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void waitForMessagesToBeDelivered() {
|
||||
waitForMessagesToBeDelivered(TimeUnit.MINUTES.toMillis(2));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.util.Collections;
|
|||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.DeliveryMode;
|
||||
import javax.jms.Destination;
|
||||
|
@ -201,7 +202,10 @@ public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.Test
|
|||
* reached.
|
||||
*/
|
||||
protected void waitForMessagesToBeDelivered() {
|
||||
long maxWaitTime = 60000;
|
||||
waitForMessagesToBeDelivered(TimeUnit.MINUTES.toMillis(1));
|
||||
}
|
||||
|
||||
protected void waitForMessagesToBeDelivered(long maxWaitTime) {
|
||||
long waitTime = maxWaitTime;
|
||||
long start = (maxWaitTime <= 0) ? 0 : System.currentTimeMillis();
|
||||
|
||||
|
|
Loading…
Reference in New Issue