From 29f4c66d99c5c727f51cd9d18989dd92f7ea07fb Mon Sep 17 00:00:00 2001 From: Aidan Skinner Date: Wed, 11 Feb 2009 15:17:19 +0000 Subject: QPID-430: Fix message age alerting so that it works on queues which are otherwise inactive. AMQQueue, VirtualHost, MockAMQQueue: change name of removeExpiredIfNoSubscribers to checkMessageStatus. AMQQueueMBean: remove unthrown exception SimpleAMQQueue: add notification checks to checkMessageStatus, remove catch for JMException which checkForNotification no longer throws. NullApplicationRegistry: set small housekeeping check period so that it runs freuqently and tests don't need to sleep for excessive periods of time AMQQueueAlertTest: remove subsequent send, notification alerts shouldn't depend on queue activity. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743357 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java | 3 --- .../src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'java/broker/src/test') diff --git a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java index af6bc0e5ab..fba30528ea 100644 --- a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java +++ b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java @@ -167,9 +167,6 @@ public class AMQQueueAlertTest extends TestCase // Ensure message sits on queue long enough to age. Thread.sleep(MAX_MESSAGE_AGE * 2); - sendMessages(1, MAX_MESSAGE_SIZE); - assertTrue(_queueMBean.getMessageCount() == 2); - Notification lastNotification = _queueMBean.getLastNotification(); assertNotNull(lastNotification); diff --git a/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java b/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java index 3fc26a6f08..758c8ddb2e 100644 --- a/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java +++ b/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java @@ -277,7 +277,8 @@ public class MockAMQQueue implements AMQQueue return 0; //To change body of implemented methods use File | Settings | File Templates. } - public void removeExpiredIfNoSubscribers() throws AMQException + @Override + public void checkMessageStatus() throws AMQException { //To change body of implemented methods use File | Settings | File Templates. } -- cgit v1.2.1