Turn off expired message processing during this test, the browse for

expired message can trip the limits that this test expects to end up
with which is not what is being tested here.
This commit is contained in:
Timothy Bish 2015-06-16 12:35:17 -04:00
parent ffef4dc5fa
commit 540d8c7079
1 changed files with 8 additions and 5 deletions

View File

@ -17,15 +17,17 @@
package org.apache.activemq.usecases; package org.apache.activemq.usecases;
import java.util.Arrays; import java.util.Arrays;
import javax.jms.*;
import javax.management.MalformedObjectNameException; import javax.jms.BytesMessage;
import javax.management.ObjectName; import javax.jms.Connection;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Queue;
import javax.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.TestSupport; import org.apache.activemq.TestSupport;
import org.apache.activemq.broker.BrokerRegistry;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.jmx.QueueView;
import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.broker.jmx.QueueViewMBean;
import org.apache.activemq.broker.region.Destination; import org.apache.activemq.broker.region.Destination;
import org.apache.activemq.broker.region.policy.PolicyEntry; import org.apache.activemq.broker.region.policy.PolicyEntry;
@ -65,6 +67,7 @@ public class MemoryLimitTest extends TestSupport {
PolicyMap policyMap = new PolicyMap(); PolicyMap policyMap = new PolicyMap();
PolicyEntry policyEntry = new PolicyEntry(); PolicyEntry policyEntry = new PolicyEntry();
policyEntry.setProducerFlowControl(false); policyEntry.setProducerFlowControl(false);
policyEntry.setExpireMessagesPeriod(0);
policyMap.put(new ActiveMQQueue(">"), policyEntry); policyMap.put(new ActiveMQQueue(">"), policyEntry);
broker.setDestinationPolicy(policyMap); broker.setDestinationPolicy(policyMap);