ARTEMIS-1530 Fix expiry statistics

This commit is contained in:
Stanislav Knot 2017-11-29 10:56:42 +01:00 committed by Clebert Suconic
parent f2b5114af8
commit 67fca940d4
2 changed files with 7 additions and 1 deletions

View File

@ -2454,7 +2454,12 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
postOffice.route(copyMessage, tx, false, rejectDuplicate);
acknowledge(tx, ref);
if (expiry) {
acknowledge(tx, ref, AckReason.EXPIRED);
} else {
acknowledge(tx, ref);
}
}
@SuppressWarnings({"ArrayToString", "ArrayToStringConcatenation"})

View File

@ -163,6 +163,7 @@ public class ExpiryRunnerTest extends ActiveMQTestBase {
Assert.assertNotNull(cm);
// assertEquals("m" + i, cm.getBody().getString());
}
Assert.assertEquals(100, ((Queue) server.getPostOffice().getBinding(qName).getBindable()).getMessagesExpired());
consumer.close();
}