ARTEMIS-1011 Small adjustment on test

This commit is contained in:
Clebert Suconic 2017-03-09 17:20:05 -05:00
parent 19ebbfb5f0
commit 9818206bd3
1 changed files with 3 additions and 7 deletions

View File

@ -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);