activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: AMQ-6824 - harden test
Date Fri, 01 Jun 2018 11:48:15 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 8b4062483 -> 63b71affb


AMQ-6824 - harden test


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

Branch: refs/heads/master
Commit: 63b71affbc22f2186ec6b02baeed34a77cbeb27b
Parents: 8b40624
Author: gtully <gary.tully@gmail.com>
Authored: Fri Jun 1 12:48:08 2018 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Fri Jun 1 12:48:08 2018 +0100

----------------------------------------------------------------------
 .../java/org/apache/activemq/JMSConsumerTest.java    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/63b71aff/activemq-unit-tests/src/test/java/org/apache/activemq/JMSConsumerTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/JMSConsumerTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/JMSConsumerTest.java
index 36a4aac..fac20f3 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/JMSConsumerTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/JMSConsumerTest.java
@@ -295,11 +295,16 @@ public class JMSConsumerTest extends JmsTestSupport {
 
         final List<Subscription> subscriptions = getDestinationConsumers(broker, destination);
 
-        assertTrue("prefetch extension..",
-                subscriptions.stream().
-                        filter(s -> s instanceof QueueSubscription).
-                        mapToInt(s -> ((QueueSubscription)s).getPrefetchExtension().get()).
-                        allMatch(e -> e == 4));
+        assertTrue("prefetch extension..", Wait.waitFor(new Wait.Condition() {
+                    @Override
+                    public boolean isSatisified() throws Exception {
+                        return subscriptions.stream().
+                                filter(s -> s instanceof QueueSubscription).
+                                mapToInt(s -> ((QueueSubscription)s).getPrefetchExtension().get()).
+                                allMatch(e -> e == 4);
+                    }
+                }));
+
 
         assertNull(consumer.receiveNoWait());
         message.acknowledge();


Mime
View raw message