activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: NO-JIRA Simple fix on test
Date Wed, 28 Feb 2018 03:04:00 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/master f7dbf7b6d -> 247f2a309


NO-JIRA Simple fix on test


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

Branch: refs/heads/master
Commit: 247f2a309a9723f2ee257c2d17befd41789c691d
Parents: f7dbf7b
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Feb 27 22:03:50 2018 -0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Feb 27 22:03:50 2018 -0500

----------------------------------------------------------------------
 .../management/QueueControlTest.java            | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/247f2a30/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 ebea686..9478690 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
@@ -1158,31 +1158,31 @@ public class QueueControlTest extends ManagementTestBase {
       queueControlA.sendMessage(new HashMap<String, String>(), Message.BYTES_TYPE,
Base64.encodeBytes("theBody".getBytes()), true, "myUser", "myPassword");
       queueControlA.sendMessage(new HashMap<String, String>(), Message.BYTES_TYPE,
Base64.encodeBytes("theBody2".getBytes()), true, "myUser", "myPassword");
 
-      Assert.assertEquals(2, getMessageCount(queueControlA));
-      Assert.assertEquals(0, getMessageCount(queueControlB));
-      Assert.assertEquals(0, getMessageCount(queueControlC));
+      Wait.assertEquals(2, () -> getMessageCount(queueControlA));
+      Wait.assertEquals(0, () -> getMessageCount(queueControlB));
+      Wait.assertEquals(0, () -> getMessageCount(queueControlC));
 
       // move 2 messages from queueA to queueB
       queueControlA.moveMessages(null, queueB.toString());
       Thread.sleep(500);
-      Assert.assertEquals(0, getMessageCount(queueControlA));
-      Assert.assertEquals(2, getMessageCount(queueControlB));
+      Wait.assertEquals(0, () -> getMessageCount(queueControlA));
+      Wait.assertEquals(2, () -> getMessageCount(queueControlB));
 
       // move 1 message to queueC
       queueControlA.sendMessage(new HashMap<String, String>(), Message.BYTES_TYPE,
Base64.encodeBytes("theBody3".getBytes()), true, "myUser", "myPassword");
-      Assert.assertEquals(1, getMessageCount(queueControlA));
+      Wait.assertEquals(1, () -> getMessageCount(queueControlA));
       queueControlA.moveMessages(null, queueC.toString());
-      Assert.assertEquals(1, getMessageCount(queueControlC));
-      Assert.assertEquals(0, getMessageCount(queueControlA));
+      Wait.assertEquals(1, () -> getMessageCount(queueControlC));
+      Wait.assertEquals(0, () -> getMessageCount(queueControlA));
 
       //move all messages back to A
       queueControlB.moveMessages(null, queueA.toString());
-      Assert.assertEquals(2, getMessageCount(queueControlA));
-      Assert.assertEquals(0, getMessageCount(queueControlB));
+      Wait.assertEquals(2, () -> getMessageCount(queueControlA));
+      Wait.assertEquals(0, () -> getMessageCount(queueControlB));
 
       queueControlC.moveMessages(null, queueA.toString());
-      Assert.assertEquals(3, getMessageCount(queueControlA));
-      Assert.assertEquals(0, getMessageCount(queueControlC));
+      Wait.assertEquals(3, () -> getMessageCount(queueControlA));
+      Wait.assertEquals(0, () -> getMessageCount(queueControlC));
 
       // consume the message from queueA
       ClientConsumer consumer = session.createConsumer(queueA);
@@ -2430,7 +2430,7 @@ public class QueueControlTest extends ManagementTestBase {
       queueControl.sendMessage(new HashMap<String, String>(), Message.BYTES_TYPE, Base64.encodeBytes("theBody".getBytes()),
true, "myUser", "myPassword");
       queueControl.sendMessage(null, Message.BYTES_TYPE, Base64.encodeBytes("theBody".getBytes()),
true, "myUser", "myPassword");
 
-      Assert.assertEquals(2, getMessageCount(queueControl));
+      Wait.assertEquals(2, () -> getMessageCount(queueControl));
 
       // the message IDs are set on the server
       CompositeData[] browse = queueControl.browse(null);


Mime
View raw message