mirror of
https://github.com/apache/activemq.git
synced 2025-02-28 05:09:07 +00:00
svn merge -c 835325 https://svn.apache.org/repos/asf/activemq/trunk - resolve https://issues.apache.org/activemq/browse/AMQ-2487, patch applied, test added
git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-5.3@835329 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e150757421
commit
2a07b408ee
@ -723,7 +723,11 @@ public class RegionBroker extends EmptyBroker {
|
||||
.getDestination());
|
||||
if (context.getBroker()==null) {
|
||||
context.setBroker(getRoot());
|
||||
}
|
||||
}
|
||||
|
||||
// Clear out the memory usage for the old queue.
|
||||
// We'll reset it to the DLQ below:
|
||||
message.setMemoryUsage(null);
|
||||
BrokerSupport.resendNoCopy(context,message,
|
||||
deadLetterDestination);
|
||||
}
|
||||
|
@ -19,8 +19,8 @@ package org.apache.activemq.broker;
|
||||
import javax.jms.DeliveryMode;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
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.command.ActiveMQDestination;
|
||||
import org.apache.activemq.command.ConnectionInfo;
|
||||
|
@ -172,6 +172,10 @@ public class ExpiredMessagesTest extends CombinationTestSupport {
|
||||
});
|
||||
assertEquals("dlq contains all expired", totalExpiredCount, dlqView.getQueueSize());
|
||||
|
||||
// memory check
|
||||
assertEquals("memory usage is back to duck egg", 0, view.getMemoryPercentUsage());
|
||||
assertTrue("memory usage is increased ", 0 < dlqView.getMemoryPercentUsage());
|
||||
|
||||
// verify DQL
|
||||
MessageConsumer dlqConsumer = createDlqConsumer(connection);
|
||||
int count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user