[1/2] activemq-artemis git commit: This closes #1680

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: This closes #1680

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master f2b5114af -> d498cf4cc


This closes #1680


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/d498cf4c
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/d498cf4c
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/d498cf4c

Branch: refs/heads/master
Commit: d498cf4cc647456c40348346a561ceb0fcf705fa
Parents: f2b5114 67fca94
Author: Clebert Suconic <[hidden email]>
Authored: Thu Nov 30 09:59:35 2017 -0500
Committer: Clebert Suconic <[hidden email]>
Committed: Thu Nov 30 09:59:35 2017 -0500

----------------------------------------------------------------------
 .../apache/activemq/artemis/core/server/impl/QueueImpl.java   | 7 ++++++-
 .../artemis/tests/integration/server/ExpiryRunnerTest.java    | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: ARTEMIS-1530 Fix expiry statistics

clebertsuconic-2
ARTEMIS-1530 Fix expiry statistics


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/67fca940
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/67fca940
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/67fca940

Branch: refs/heads/master
Commit: 67fca940d433cce0c9aa14895af5e24887b16801
Parents: f2b5114
Author: Stanislav Knot <[hidden email]>
Authored: Wed Nov 29 10:56:42 2017 +0100
Committer: Clebert Suconic <[hidden email]>
Committed: Thu Nov 30 09:59:35 2017 -0500

----------------------------------------------------------------------
 .../apache/activemq/artemis/core/server/impl/QueueImpl.java   | 7 ++++++-
 .../artemis/tests/integration/server/ExpiryRunnerTest.java    | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/67fca940/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index 31a4869..41f504f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -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"})

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/67fca940/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java
index fa04395..74c9cff 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java
@@ -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();
    }