AMQ-6361 - fix additional test regression on topic sub expiry AMQ4083Test,MessageEvictionTest

This commit is contained in:
gtully 2016-07-26 13:45:41 +01:00
parent d54e21b2ff
commit 01cfa7727d
2 changed files with 5 additions and 4 deletions

View File

@ -232,12 +232,14 @@ public class TopicSubscription extends AbstractSubscription {
while (matched.hasNext()) {
MessageReference node = matched.next();
node.decrementReferenceCount();
if (broker.isExpired(node)) {
if (node.isExpired()) {
matched.remove();
getSubscriptionStatistics().getDispatched().increment();
node.decrementReferenceCount();
((Destination)node.getRegionDestination()).getDestinationStatistics().getExpired().increment();
broker.messageExpired(getContext(), node, this);
if (broker.isExpired(node)) {
((Destination) node.getRegionDestination()).getDestinationStatistics().getExpired().increment();
broker.messageExpired(getContext(), node, this);
}
break;
}
}

View File

@ -202,7 +202,6 @@ public class MessageEvictionTest {
for (int i=0; i< numMessages; i++) {
producer.send(session.createTextMessage(payload));
sent.incrementAndGet();
TimeUnit.MILLISECONDS.sleep(10);
}
producer.close();
sendDone.countDown();