git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1354291 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-06-26 23:40:59 +00:00
parent 3813947879
commit f90e6b9b6d
1 changed files with 5 additions and 7 deletions

View File

@ -27,6 +27,7 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.PolicyEntry;
@ -82,7 +83,6 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis
broker.waitUntilStarted();
}
protected void tearDown() throws Exception {
broker.stop();
broker.waitUntilStopped();
@ -138,19 +138,17 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis
assertEquals("Didn't produce all messages", numMessagesToSend, produced.get());
assertEquals("Didn't consume all messages", numMessagesToSend, consumed.get());
}
@Override
public void onMessage(Message message) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
}
long count = consumed.incrementAndGet();
if (count % 100 == 0) {
LOG.info("\tConsumed " + count + " messages");
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
}
}
}