From 417fcd7f1940164c42473e0b63759f46e12175ec Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Thu, 20 Sep 2007 11:09:32 +0000 Subject: [PATCH] Don't use System.out git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@577683 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/bugs/QueueWorkerPrefetchTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java b/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java index a2131cbfb8..39a739e170 100644 --- a/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java @@ -37,12 +37,15 @@ import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQPrefetchPolicy; import org.apache.activemq.broker.BrokerService; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; /** * Test case demonstrating situation where messages are not delivered to consumers. */ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener { + private static final Log LOG = LogFactory.getLog(QueueWorkerPrefetchTest.class); private static final int BATCH_SIZE = 10; private static final long WAIT_TIMEOUT = 1000*10; @@ -156,7 +159,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener long acks = acksReceived.incrementAndGet(); latch.get().countDown(); if (acks % 1 == 0) { - System.out.println("Master now has ack count of: " + acksReceived); + LOG.info("Master now has ack count of: " + acksReceived); } } @@ -212,7 +215,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener fail("First batch only received " + acksReceived + " messages"); } - System.out.println("First batch received"); + LOG.info("First batch received"); // Send another message to the work queue, and wait for the next 1000 acks. It is // at this point where the workers never get notified of this message, as they @@ -226,7 +229,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener fail("Second batch only received " + acksReceived + " messages"); } - System.out.println("Second batch received"); + LOG.info("Second batch received"); // Cleanup all JMS resources. for (int i = 0; i < NUM_WORKERS; i++) {