Quantcast

activemq-artemis git commit: NO-JIRA: trivial test fixes on AMQP

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

activemq-artemis git commit: NO-JIRA: trivial test fixes on AMQP

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 5e6687e0e -> ac97d6f05


NO-JIRA: trivial test fixes on AMQP


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/ac97d6f0
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/ac97d6f0
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/ac97d6f0

Branch: refs/heads/master
Commit: ac97d6f05735c4f2065044760e7567bbe4168b9c
Parents: 5e6687e
Author: Clebert Suconic <[hidden email]>
Authored: Fri May 12 14:36:01 2017 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Fri May 12 14:36:01 2017 -0400

----------------------------------------------------------------------
 .../integration/amqp/JMSClientTestSupport.java     | 17 ++++++++++++-----
 .../tests/integration/amqp/JMSTransactionTest.java |  2 ++
 2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ac97d6f0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSClientTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSClientTestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSClientTestSupport.java
index 78ca309..edd4968 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSClientTestSupport.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSClientTestSupport.java
@@ -24,11 +24,14 @@ import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
 
 import org.apache.qpid.jms.JmsConnectionFactory;
+import org.jboss.logging.Logger;
 import org.junit.After;
 import org.junit.Before;
 
 public abstract class JMSClientTestSupport extends AmqpClientTestSupport {
 
+   private static final Logger logger = Logger.getLogger(JMSClientTestSupport.class);
+
    protected LinkedList<Connection> jmsConnections = new LinkedList<>();
 
    @Before
@@ -44,12 +47,16 @@ public abstract class JMSClientTestSupport extends AmqpClientTestSupport {
    @After
    @Override
    public void tearDown() throws Exception {
-      for (Connection connection : jmsConnections) {
-         try {
-            connection.close();
-         } catch (Throwable ignored) {
-            ignored.printStackTrace();
+      try {
+         for (Connection connection : jmsConnections) {
+            try {
+               connection.close();
+            } catch (Throwable ignored) {
+               ignored.printStackTrace();
+            }
          }
+      } catch (Exception e) {
+         logger.warn(e);
       }
       jmsConnections.clear();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ac97d6f0/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactionTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactionTest.java
index c7f73c1..84212c3 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/JMSTransactionTest.java
@@ -193,6 +193,8 @@ public class JMSTransactionTest extends JMSClientTestSupport {
 
       session.rollback();
 
+      Wait.waitFor(() -> MSG_COUNT == queueView.getConsumerCount());
+
       assertEquals(MSG_COUNT, queueView.getMessageCount());
 
       // Consume again..check we receive all the messages.

Loading...