From 9818206bd3aa893864eedf06d19d0c2d5c355a9c Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Thu, 9 Mar 2017 17:20:05 -0500 Subject: [PATCH] ARTEMIS-1011 Small adjustment on test --- .../tests/integration/client/SlowConsumerTest.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java index 4f47ac1435..00417ae101 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SlowConsumerTest.java @@ -269,13 +269,9 @@ public class SlowConsumerTest extends ActiveMQTestBase { ClientConsumer consumer = addClientConsumer(session.createConsumer(QUEUE)); session.start(); - Wait.waitFor(new Wait.Condition() { - @Override - public boolean isSatisfied() throws Exception { - forceGC(); - return queue.getConsumerCount() == 0; - } - }, 3000, 100); + Wait.waitFor(consumer::isClosed, 3000, 100); + + Assert.assertTrue(consumer.isClosed()); try { consumer.receive(500);