mirror of https://github.com/apache/activemq.git
enable a few more expiry tests - https://issues.apache.org/activemq/browse/AMQ-1112
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@790957 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
00bb52bcde
commit
7ac1bb8baa
|
@ -53,8 +53,6 @@ import org.apache.activemq.command.TransactionInfo;
|
||||||
import org.apache.activemq.command.XATransactionId;
|
import org.apache.activemq.command.XATransactionId;
|
||||||
import org.apache.activemq.store.PersistenceAdapter;
|
import org.apache.activemq.store.PersistenceAdapter;
|
||||||
import org.apache.activemq.usage.SystemUsage;
|
import org.apache.activemq.usage.SystemUsage;
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
public class BrokerTestSupport extends CombinationTestSupport {
|
public class BrokerTestSupport extends CombinationTestSupport {
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ import javax.jms.DeliveryMode;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import org.apache.activemq.broker.region.policy.PolicyEntry;
|
import org.apache.activemq.broker.region.policy.PolicyEntry;
|
||||||
|
import org.apache.activemq.broker.region.policy.PolicyMap;
|
||||||
import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
|
import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStoragePolicy;
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ConnectionInfo;
|
import org.apache.activemq.command.ConnectionInfo;
|
||||||
|
@ -33,9 +34,9 @@ import org.apache.activemq.command.SessionInfo;
|
||||||
public class MessageExpirationTest extends BrokerTestSupport {
|
public class MessageExpirationTest extends BrokerTestSupport {
|
||||||
|
|
||||||
public ActiveMQDestination destination;
|
public ActiveMQDestination destination;
|
||||||
public int deliveryMode;
|
public int deliveryMode = DeliveryMode.NON_PERSISTENT;
|
||||||
public int prefetch;
|
public int prefetch;
|
||||||
public byte destinationType;
|
public byte destinationType = ActiveMQDestination.QUEUE_TYPE;
|
||||||
public boolean durableConsumer;
|
public boolean durableConsumer;
|
||||||
|
|
||||||
protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination, int deliveryMode, int timeToLive) {
|
protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination, int deliveryMode, int timeToLive) {
|
||||||
|
@ -63,10 +64,13 @@ public class MessageExpirationTest extends BrokerTestSupport {
|
||||||
PolicyEntry policy = super.getDefaultPolicy();
|
PolicyEntry policy = super.getDefaultPolicy();
|
||||||
// disable spooling
|
// disable spooling
|
||||||
policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
|
policy.setPendingSubscriberPolicy(new VMPendingSubscriberMessageStoragePolicy());
|
||||||
|
// have aggressive expiry period to ensure no deadlock or clash
|
||||||
|
policy.setExpireMessagesPeriod(100);
|
||||||
|
|
||||||
return policy;
|
return policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void XtestMessagesWaitingForUssageDecreaseExpire() throws Exception {
|
public void testMessagesWaitingForUsageDecreaseExpire() throws Exception {
|
||||||
|
|
||||||
// Start a producer
|
// Start a producer
|
||||||
final StubConnection connection = createConnection();
|
final StubConnection connection = createConnection();
|
||||||
|
@ -211,12 +215,6 @@ public class MessageExpirationTest extends BrokerTestSupport {
|
||||||
connection.send(closeConnectionInfo(connectionInfo));
|
connection.send(closeConnectionInfo(connectionInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void xinitCombosForTestMessagesInSubscriptionPendingListExpire() {
|
|
||||||
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
|
|
||||||
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
|
|
||||||
Byte.valueOf(ActiveMQDestination.TEMP_QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TEMP_TOPIC_TYPE)});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void initCombosForTestMessagesInSubscriptionPendingListExpire() {
|
public void initCombosForTestMessagesInSubscriptionPendingListExpire() {
|
||||||
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
|
addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
|
||||||
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
|
addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.QUEUE_TYPE), Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),
|
||||||
|
|
Loading…
Reference in New Issue