activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [activemq-artemis] branch main updated: NO-JIRA fixing intermittent failure with a Wait call
Date Thu, 03 Jun 2021 00:00:48 GMT
This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new f380324  NO-JIRA fixing intermittent failure with a Wait call
f380324 is described below

commit f380324ca3308ffde6a36b6681386f429ddd1134
Author: Clebert Suconic <clebertsuconic@apache.org>
AuthorDate: Wed Jun 2 19:53:26 2021 -0400

    NO-JIRA fixing intermittent failure with a Wait call
---
 .../artemis/tests/integration/client/TransactionalSendTest.java  | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransactionalSendTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransactionalSendTest.java
index b72e7a9..18d0d15 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransactionalSendTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransactionalSendTest.java
@@ -25,6 +25,7 @@ import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
+import org.apache.activemq.artemis.tests.util.Wait;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -68,9 +69,9 @@ public class TransactionalSendTest extends ActiveMQTestBase {
       for (int i = 0; i < numMessages; i++) {
          cp.send(session.createMessage(false));
       }
-      Assert.assertEquals(numMessages, getMessageCount(q));
+      Wait.assertEquals(numMessages, q::getMessageCount);
       session.commit();
-      Assert.assertEquals(numMessages * 2, getMessageCount(q));
+      Wait.assertEquals(numMessages * 2, q::getMessageCount);
       session.close();
    }
 
@@ -94,9 +95,9 @@ public class TransactionalSendTest extends ActiveMQTestBase {
       for (int i = 0; i < numMessages; i++) {
          cp.send(session.createMessage(false));
       }
-      Assert.assertEquals(0, getMessageCount(q));
+      Wait.assertEquals(0, q::getMessageCount);
       session.commit();
-      Assert.assertEquals(numMessages, getMessageCount(q));
+      Wait.assertEquals(numMessages, q::getMessageCount);
       session.close();
    }
 

Mime
View raw message