activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [4/6] activemq-artemis git commit: NO-JIRA fix flaky test QueueControlTest#testListMessagesWithNullFilter
Date Wed, 08 Aug 2018 15:31:37 GMT
NO-JIRA fix flaky test QueueControlTest#testListMessagesWithNullFilter

The below error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
        [...]
    	at org.junit.Assert.assertEquals(Assert.java:542)
    	at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testListMessagesWithNullFilter(QueueControlTest.java:804)


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

Branch: refs/heads/master
Commit: fbb622ae6976209a0d2d4ec1852ca8b91c4cf1e9
Parents: 5c2f79e
Author: Jiri Danek <jdanek@redhat.com>
Authored: Tue Aug 7 16:59:30 2018 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Aug 8 11:31:23 2018 -0400

----------------------------------------------------------------------
 .../artemis/tests/integration/management/QueueControlTest.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fbb622ae/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
index 8eb6e03..fb0a3e5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java
@@ -800,13 +800,11 @@ public class QueueControlTest extends ManagementTestBase {
       producer.send(session.createMessage(durable));
       producer.send(session.createMessage(durable));
 
-      Map<String, Object>[] messages = queueControl.listMessages(null);
-      Assert.assertEquals(2, messages.length);
+      Wait.assertEquals(2, () -> queueControl.listMessages(null).length);
 
       consumeMessages(2, session, queue);
 
-      messages = queueControl.listMessages(null);
-      Assert.assertEquals(0, messages.length);
+      Wait.assertEquals(0, () -> queueControl.listMessages(null).length);
 
       session.deleteQueue(queue);
    }


Mime
View raw message