From fe89b0264bed7081f189cb8f27abea3ba9ae8e8d Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Thu, 29 Apr 2010 10:10:28 +0000 Subject: [PATCH] validation test for https://issues.apache.org/activemq/browse/AMQ-2716, delete of reply queue git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@939249 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/JmsTopicRequestReplyTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java index f44c905370..d5d511be10 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java @@ -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 extends TestSupport implements MessageList } 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 extends TestSupport implements MessageList } return session.createTemporaryQueue(); } + + protected void deleteTemporaryDestination(Destination dest) throws JMSException { + if (topic) { + ((TemporaryTopic)dest).delete(); + } else { + ((TemporaryQueue)dest).delete(); + } + } }