activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r939249 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
Date Thu, 29 Apr 2010 10:10:28 GMT
Author: gtully
Date: Thu Apr 29 10:10:28 2010
New Revision: 939249

URL: http://svn.apache.org/viewvc?rev=939249&view=rev
Log:
validation test for https://issues.apache.org/activemq/browse/AMQ-2716, delete of reply queue

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java?rev=939249&r1=939248&r2=939249&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java
Thu Apr 29 10:10:28 2010
@@ -27,6 +27,8 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import javax.jms.TemporaryQueue;
+import javax.jms.TemporaryTopic;
 import javax.jms.TextMessage;
 
 import org.apache.activemq.test.TestSupport;
@@ -91,6 +93,8 @@ public class JmsTopicRequestReplyTest ex
         } else {
             fail("Should have received a reply by now");
         }
+        replyConsumer.close();
+        deleteTemporaryDestination(replyDestination);
 
         assertEquals("Should not have had any failures: " + failures, 0, failures.size());
     }
@@ -206,5 +210,13 @@ public class JmsTopicRequestReplyTest ex
         }
         return session.createTemporaryQueue();
     }
+    
+    protected void deleteTemporaryDestination(Destination dest) throws JMSException {
+        if (topic) {
+            ((TemporaryTopic)dest).delete();
+        } else {
+            ((TemporaryQueue)dest).delete();
+        }
+    }
 
 }



Mime
View raw message