NO-JIRA: Changing TopicControlClusterTest to expression

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

Branch: refs/heads/master
Commit: 8cf3119767cd930c4fa4b054cd8497bf4c5fea5e
Parents: bf5ca67
Author: Clebert Suconic <[email protected]>
Authored: Tue Mar 14 09:42:49 2017 -0400
Committer: Clebert Suconic <[email protected]>
Committed: Tue Mar 14 09:42:49 2017 -0400

----------------------------------------------------------------------
 .../server/management/TopicControlClusterTest.java  | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/8cf31197/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlClusterTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlClusterTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlClusterTest.java
index 5b858b8..5db6575 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlClusterTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/TopicControlClusterTest.java
@@ -52,19 +52,11 @@ public class TopicControlClusterTest extends 
JMSClusteredTestBase {
          AddressControl topicControl1 = 
ManagementControlHelper.createAddressControl(simpleTopicName, mBeanServer1);
          AddressControl topicControl2 = 
ManagementControlHelper.createAddressControl(simpleTopicName, mBeanServer2);
 
-         assertTrue("There should be 3 subscriptions on the topic, 2 local and 
1 remote.", Wait.waitFor(new Wait.Condition() {
-            @Override
-            public boolean isSatisfied() throws Exception {
-               return topicControl1.getQueueNames().length == 3;
-            }
-         }, 2000));
+         assertTrue("There should be 3 subscriptions on the topic, 2 local and 
1 remote.",
+                    Wait.waitFor(() -> topicControl1.getQueueNames().length == 
3, 2000));
 
-         assertTrue("There should be 3 subscriptions on the topic, 1 local and 
2 remote.", Wait.waitFor(new Wait.Condition() {
-            @Override
-            public boolean isSatisfied() throws Exception {
-               return topicControl2.getQueueNames().length == 3;
-            }
-         }, 2000));
+         assertTrue("There should be 3 subscriptions on the topic, 1 local and 
2 remote.",
+                    Wait.waitFor(() -> topicControl2.getQueueNames().length == 
3, 2000));
       }
 
       jmsServer1.destroyTopic("t1");

Reply via email to