activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1361138 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java
Date Fri, 13 Jul 2012 10:20:46 GMT
Author: gtully
Date: Fri Jul 13 10:20:46 2012
New Revision: 1361138

URL: http://svn.apache.org/viewvc?rev=1361138&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3903  - expand test to validate Full advisory: https://issues.apache.org/jira/browse/AMQ-3925

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java?rev=1361138&r1=1361137&r2=1361138&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ3903Test.java Fri
Jul 13 10:20:46 2012
@@ -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);



Mime
View raw message