JmsTempDestinationTest was intermitently failing due to a timing issue.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@545232 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2007-06-07 16:19:09 +00:00
parent 3965f2c34d
commit 421b911da2
1 changed files with 3 additions and 1 deletions

View File

@ -217,8 +217,9 @@ public class JmsTempDestinationTest extends TestCase {
* Make sure you cannot publish to a temp destination that does not exist anymore.
*
* @throws JMSException
* @throws InterruptedException
*/
public void testPublishFailsForDestoryedTempDestination() throws JMSException {
public void testPublishFailsForDestoryedTempDestination() throws JMSException, InterruptedException {
Connection tempConnection = factory.createConnection();
Session tempSession = tempConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@ -235,6 +236,7 @@ public class JmsTempDestinationTest extends TestCase {
// deleting the Queue will cause sends to fail
queue.delete();
Thread.sleep(1000); // Wait a little bit to let the delete take effect.
// This message delivery NOT should work since the temp connection is now closed.
try {