mirror of
https://github.com/apache/activemq.git
synced 2025-02-16 23:16:52 +00:00
AMQ-6824 - harden test
This commit is contained in:
parent
8b40624837
commit
63b71affbc
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user