From a5bb9bd1d792b1676884f31e5254d9e1c4fbb27c Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Fri, 13 Jul 2012 10:20:46 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-3903 - expand test to validate Full advisory: https://issues.apache.org/jira/browse/AMQ-3925 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1361138 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/activemq/bugs/AMQ3903Test.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java index cdda378ed8..746897022d 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java @@ -92,8 +92,11 @@ public class AMQ3903Test { final TemporaryQueue queue = session.createTemporaryQueue(); final Topic advisoryTopic = AdvisorySupport.getFastProducerAdvisoryTopic((ActiveMQDestination) queue); + final Topic advisoryWhenFullTopic = AdvisorySupport.getFullAdvisoryTopic((ActiveMQDestination) queue); MessageConsumer advisoryConsumer = session.createConsumer(advisoryTopic); + MessageConsumer advisoryWhenFullConsumer = session.createConsumer(advisoryWhenFullTopic); + MessageProducer producer = session.createProducer(genericProducer ? null : queue); try { @@ -113,6 +116,8 @@ public class AMQ3903Test { Message advCmsg = advisoryConsumer.receive(4000); assertNotNull(advCmsg); + advCmsg = advisoryWhenFullConsumer.receive(4000); + assertNotNull(advCmsg); connection.close(); LOG.debug("Connection closed, destinations should now become inactive."); @@ -125,6 +130,7 @@ public class AMQ3903Test { PolicyEntry entry = new PolicyEntry(); entry.setAdvisoryForFastProducers(true); + entry.setAdvisoryWhenFull(true); entry.setMemoryLimit(10000); PolicyMap map = new PolicyMap(); map.setDefaultEntry(entry);