diff options
Diffstat (limited to 'qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java')
-rw-r--r-- | qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java index 1bc50db1d5..237fe20f7e 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java @@ -34,6 +34,7 @@ import org.apache.qpid.server.AMQChannel; import org.apache.qpid.server.transactionlog.TransactionLog; import org.apache.qpid.server.subscription.Subscription; import org.apache.qpid.server.subscription.SubscriptionFactoryImpl; +import org.apache.qpid.server.configuration.QueueConfiguration; import org.apache.qpid.server.protocol.AMQMinaProtocolSession; import org.apache.qpid.server.protocol.InternalTestProtocolSession; import org.apache.qpid.framing.ContentHeaderBody; @@ -203,7 +204,7 @@ public class AMQQueueAlertTest extends TestCase // Send messages(no of message to be little more than what can cause a Queue_Depth alert) int messageCount = Math.round(MAX_QUEUE_DEPTH / MAX_MESSAGE_SIZE) + 10; - long totalSize = (messageCount * MAX_MESSAGE_SIZE) >> 10; + long totalSize = (messageCount * MAX_MESSAGE_SIZE); sendMessages(messageCount, MAX_MESSAGE_SIZE); // Check queueDepth. There should be no messages on the queue and as the subscriber is listening @@ -250,26 +251,6 @@ public class AMQQueueAlertTest extends TestCase _queueMBean.clearQueue(); assertEquals(new Long(0), new Long(_queueMBean.getQueueDepth())); } - - public void testAlertConfiguration() throws AMQException - { - // Setup configuration - CompositeConfiguration config = new CompositeConfiguration(); - config.setProperty("maximumMessageSize", new Long(23)); - config.setProperty("maximumMessageCount", new Long(24)); - config.setProperty("maximumQueueDepth", new Long(25)); - config.setProperty("maximumMessageAge", new Long(26)); - - // Create queue and set config - _queue = getNewQueue(); - _queue.configure(config); - - // Check alerts and notifications - Set<NotificationCheck> checks = _queue.getNotificationChecks(); - assertNotNull("No checks found", checks); - assertFalse("Checks should not be empty", checks.isEmpty()); - assertEquals("Wrong number of checks", 4, checks.size()); - } protected IncomingMessage message(final boolean immediate, long size) throws AMQException { |