You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2017/09/13 22:25:55 UTC

activemq-artemis git commit: ARTEMIS-1419 Small tweak on openwire Test

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 02b6b8c8e -> 481f75358


ARTEMIS-1419 Small tweak on openwire 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/481f7535
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/481f7535
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/481f7535

Branch: refs/heads/master
Commit: 481f75358989c95da2da14ab821736dead3ecec5
Parents: 02b6b8c
Author: Clebert Suconic <cl...@apache.org>
Authored: Wed Sep 13 18:25:10 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Wed Sep 13 18:25:10 2017 -0400

----------------------------------------------------------------------
 .../tests/integration/openwire/SimpleOpenWireTest.java      | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/481f7535/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
index dac67fc..5521814 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/SimpleOpenWireTest.java
@@ -1604,20 +1604,19 @@ public class SimpleOpenWireTest extends BasicOpenWireTest {
          }
 
          Object[] addressResources = server.getManagementService().getResources(AddressControl.class);
-         AddressControl addressControl = null;
 
          for (Object addressResource : addressResources) {
 
             if (((AddressControl) addressResource).getAddress().equals("ActiveMQ.Advisory.TempQueue")) {
-               addressControl = (AddressControl) addressResource;
+               AddressControl addressControl = (AddressControl) addressResource;
+               Wait.waitFor(() -> addressControl.getMessageCount() == 0);
+               assertNotNull("addressControl for temp advisory", addressControl);
+               assertEquals(0, addressControl.getMessageCount());
             }
          }
 
-         assertNotNull("addressControl for temp advisory", addressControl);
 
          //sleep a bit to allow message count to go down.
-         Thread.sleep(50);
-         assertEquals(0, addressControl.getMessageCount());
       } finally {
          for (Connection conn : connections) {
             if (conn != null) {