From f1c4a320174511a1d78192fa4e6d6141caa002d2 Mon Sep 17 00:00:00 2001 From: "Timothy A. Bish" Date: Mon, 15 Oct 2012 17:46:54 +0000 Subject: [PATCH] Remove the System.out lines from the test, use LOG instead. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1398419 13f79535-47bb-0310-9956-ffa450edef68 --- .../JmsSendWithAsyncCallbackTest.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java b/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java index a12207a93e..5537513d47 100755 --- a/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java @@ -16,15 +16,27 @@ */ package org.apache.activemq; -import javax.jms.*; -import javax.jms.Message; import java.util.concurrent.CountDownLatch; +import javax.jms.Connection; +import javax.jms.DeliveryMode; +import javax.jms.JMSException; +import javax.jms.Message; +import javax.jms.MessageConsumer; +import javax.jms.MessageListener; +import javax.jms.Queue; +import javax.jms.Session; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** - * + * */ public class JmsSendWithAsyncCallbackTest extends TestSupport { + private static final Logger LOG = LoggerFactory.getLogger(JmsSendWithAsyncCallbackTest.class); + private Connection connection; protected void setUp() throws Exception { @@ -42,7 +54,6 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport { } super.tearDown(); } - public void testAsyncCallbackIsFaster() throws JMSException, InterruptedException { connection.start(); @@ -67,8 +78,8 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport { double callbackRate = benchmarkCallbackRate(); double nonCallbackRate = benchmarkNonCallbackRate(); - System.out.println(String.format("AsyncCallback Send rate: %,.2f m/s", callbackRate)); - System.out.println(String.format("NonAsyncCallback Send rate: %,.2f m/s", nonCallbackRate)); + LOG.info(String.format("AsyncCallback Send rate: %,.2f m/s", callbackRate)); + LOG.info(String.format("NonAsyncCallback Send rate: %,.2f m/s", nonCallbackRate)); // The async style HAS to be faster than the non-async style.. assertTrue( callbackRate/nonCallbackRate > 1.5 ); @@ -111,5 +122,4 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport { messagesSent.await(); return 1000.0 * count / (System.currentTimeMillis() - start); } - }