mirror of https://github.com/apache/activemq.git
Allow previous messages to drain before doing the real test. (makes the test more reliable)
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@387563 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4757b273d1
commit
a5ee130bea
|
@ -96,10 +96,13 @@ public class SpringTest extends TestCase {
|
||||||
|
|
||||||
consumer.start();
|
consumer.start();
|
||||||
|
|
||||||
|
// Wait a little to drain any left over messages.
|
||||||
|
Thread.sleep(1000);
|
||||||
|
consumer.flushMessages();
|
||||||
|
|
||||||
producer = (SpringProducer) context.getBean("producer");
|
producer = (SpringProducer) context.getBean("producer");
|
||||||
assertTrue("Found a valid producer", producer != null);
|
assertTrue("Found a valid producer", producer != null);
|
||||||
|
|
||||||
consumer.flushMessages();
|
|
||||||
producer.start();
|
producer.start();
|
||||||
|
|
||||||
// lets sleep a little to give the JMS time to dispatch stuff
|
// lets sleep a little to give the JMS time to dispatch stuff
|
||||||
|
|
Loading…
Reference in New Issue