You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/03/16 14:03:05 UTC
[activemq-artemis] branch master updated: ARTEMIS-2659 fix race in
AMQP test
This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 91eeacc ARTEMIS-2659 fix race in AMQP test
91eeacc is described below
commit 91eeacca3102ddbd007bc49b7d4dffb0629af163
Author: Justin Bertram <jb...@apache.org>
AuthorDate: Mon Mar 16 09:02:13 2020 -0500
ARTEMIS-2659 fix race in AMQP test
---
.../artemis/tests/integration/amqp/TopicDurableTests.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/TopicDurableTests.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/TopicDurableTests.java
index 8ba922d..8e7f463 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/TopicDurableTests.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/TopicDurableTests.java
@@ -30,19 +30,17 @@ import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.naming.Context;
import javax.naming.InitialContext;
-import javax.naming.NamingException;
-
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;
+import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.utils.Wait;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.junit.Test;
@@ -119,7 +117,7 @@ public class TopicDurableTests extends JMSClientTestSupport {
@Test
- public void testSharedNonDurableSubscription() throws JMSException, NamingException, InterruptedException, ExecutionException, TimeoutException {
+ public void testSharedNonDurableSubscription() throws Exception {
int iterations = 10;
for (int i = 0; i < iterations; i++) {
System.out.println("testSharedNonDurableSubscription; iteration: " + i);
@@ -176,6 +174,9 @@ public class TopicDurableTests extends JMSClientTestSupport {
connection1.close();
connection2.close();
//TEAR-DOWN-E
+
+ // ensure the topic is auto-deleted before continuing to the next iteration
+ Wait.assertTrue(() -> server.getAddressInfo(SimpleString.toSimpleString("jmsTopic")) == null, 2000, 100);
}
}