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
This commit is contained in:
Timothy A. Bish 2012-10-15 17:46:54 +00:00
parent 0a5ce71f6f
commit f1c4a32017
1 changed files with 17 additions and 7 deletions

View File

@ -16,15 +16,27 @@
*/ */
package org.apache.activemq; package org.apache.activemq;
import javax.jms.*;
import javax.jms.Message;
import java.util.concurrent.CountDownLatch; 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 { public class JmsSendWithAsyncCallbackTest extends TestSupport {
private static final Logger LOG = LoggerFactory.getLogger(JmsSendWithAsyncCallbackTest.class);
private Connection connection; private Connection connection;
protected void setUp() throws Exception { protected void setUp() throws Exception {
@ -43,7 +55,6 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
super.tearDown(); super.tearDown();
} }
public void testAsyncCallbackIsFaster() throws JMSException, InterruptedException { public void testAsyncCallbackIsFaster() throws JMSException, InterruptedException {
connection.start(); connection.start();
@ -67,8 +78,8 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
double callbackRate = benchmarkCallbackRate(); double callbackRate = benchmarkCallbackRate();
double nonCallbackRate = benchmarkNonCallbackRate(); double nonCallbackRate = benchmarkNonCallbackRate();
System.out.println(String.format("AsyncCallback Send rate: %,.2f m/s", callbackRate)); LOG.info(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("NonAsyncCallback Send rate: %,.2f m/s", nonCallbackRate));
// The async style HAS to be faster than the non-async style.. // The async style HAS to be faster than the non-async style..
assertTrue( callbackRate/nonCallbackRate > 1.5 ); assertTrue( callbackRate/nonCallbackRate > 1.5 );
@ -111,5 +122,4 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
messagesSent.await(); messagesSent.await();
return 1000.0 * count / (System.currentTimeMillis() - start); return 1000.0 * count / (System.currentTimeMillis() - start);
} }
} }