activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [activemq-artemis] branch master updated: ARTEMIS-2659 fix race in AMQP test
Date Mon, 16 Mar 2020 14:03:05 GMT
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 <jbertram@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);
       }
    }
 


Mime
View raw message