mirror of https://github.com/apache/activemq.git
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:
parent
c4d8bc47a0
commit
fe89b0264b
|
@ -27,6 +27,8 @@ import javax.jms.MessageConsumer;
|
||||||
import javax.jms.MessageListener;
|
import javax.jms.MessageListener;
|
||||||
import javax.jms.MessageProducer;
|
import javax.jms.MessageProducer;
|
||||||
import javax.jms.Session;
|
import javax.jms.Session;
|
||||||
|
import javax.jms.TemporaryQueue;
|
||||||
|
import javax.jms.TemporaryTopic;
|
||||||
import javax.jms.TextMessage;
|
import javax.jms.TextMessage;
|
||||||
|
|
||||||
import org.apache.activemq.test.TestSupport;
|
import org.apache.activemq.test.TestSupport;
|
||||||
|
@ -91,6 +93,8 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList
|
||||||
} else {
|
} else {
|
||||||
fail("Should have received a reply by now");
|
fail("Should have received a reply by now");
|
||||||
}
|
}
|
||||||
|
replyConsumer.close();
|
||||||
|
deleteTemporaryDestination(replyDestination);
|
||||||
|
|
||||||
assertEquals("Should not have had any failures: " + failures, 0, failures.size());
|
assertEquals("Should not have had any failures: " + failures, 0, failures.size());
|
||||||
}
|
}
|
||||||
|
@ -207,4 +211,12 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList
|
||||||
return session.createTemporaryQueue();
|
return session.createTemporaryQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void deleteTemporaryDestination(Destination dest) throws JMSException {
|
||||||
|
if (topic) {
|
||||||
|
((TemporaryTopic)dest).delete();
|
||||||
|
} else {
|
||||||
|
((TemporaryQueue)dest).delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue