You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2015/06/13 11:46:31 UTC
svn commit: r1685229 -
/qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/client/DynamicQueueExchangeCreateTest.java
Author: kwall
Date: Sat Jun 13 09:46:31 2015
New Revision: 1685229
URL: http://svn.apache.org/r1685229
Log:
QPID-6570: [Java System Tests] Temporarily workaround the fact that exchange deletion is not completely atomic
Modified:
qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/client/DynamicQueueExchangeCreateTest.java
Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/client/DynamicQueueExchangeCreateTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/client/DynamicQueueExchangeCreateTest.java?rev=1685229&r1=1685228&r2=1685229&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/client/DynamicQueueExchangeCreateTest.java (original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/client/DynamicQueueExchangeCreateTest.java Sat Jun 13 09:46:31 2015
@@ -27,6 +27,7 @@ import org.apache.qpid.client.AMQSession
import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.management.common.mbeans.ManagedExchange;
import org.apache.qpid.protocol.AMQConstant;
+import org.apache.qpid.server.model.SystemConfig;
import org.apache.qpid.test.utils.JMXTestUtils;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
import org.apache.qpid.url.BindingURL;
@@ -225,8 +226,16 @@ public class DynamicQueueExchangeCreateT
// binding to be deleted. This will trigger the auto deleted exchange to be removed too
consumer.close();
- assertFalse("Exchange " + exchangeName + " should not longer exist",
- _jmxUtils.doesManagedObjectExist(exchangeObjectName));
+ // Temporarily workaround the fact that exchange deletion is not completely atomic
+ // in the Java Broker.
+ long timeout = System.currentTimeMillis() + 10000;
+ boolean exchangeExists = true;
+ while (timeout > System.currentTimeMillis() && exchangeExists)
+ {
+ exchangeExists = _jmxUtils.doesManagedObjectExist(exchangeObjectName);
+ }
+ assertFalse("Exchange " + exchangeName + " should no longer exist",
+ exchangeExists);
}
private void checkExceptionErrorCode(JMSException original, AMQConstant code)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org