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
This commit is contained in:
Gary Tully 2010-04-29 10:10:28 +00:00
parent c4d8bc47a0
commit fe89b0264b
1 changed files with 12 additions and 0 deletions

View File

@ -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();
}
}
}