mirror of https://github.com/apache/activemq.git
more hardening for intermittent failure
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@799631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c20430459a
commit
9caa5c8d4d
|
@ -51,6 +51,7 @@ import org.apache.activemq.command.ActiveMQTopic;
|
|||
import org.apache.activemq.store.PersistenceAdapter;
|
||||
import org.apache.activemq.store.amq.AMQPersistenceAdapter;
|
||||
import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
|
||||
import org.apache.activemq.util.Wait;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
|
@ -273,9 +274,14 @@ public class DurableConsumerTest extends TestCase {
|
|||
}
|
||||
}
|
||||
|
||||
Thread.sleep(2000);
|
||||
executor.shutdown();
|
||||
executor.awaitTermination(30, TimeUnit.SECONDS);
|
||||
|
||||
Wait.waitFor(new Wait.Condition() {
|
||||
public boolean isSatisified() throws Exception {
|
||||
return receivedCount.get() > numMessages;
|
||||
}
|
||||
});
|
||||
assertTrue("got some messages: " + receivedCount.get(), receivedCount.get() > numMessages);
|
||||
assertTrue("no exceptions, but: " + exceptions, exceptions.isEmpty());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue