You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/10/15 19:46:55 UTC
svn commit: r1398419 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java
Author: tabish
Date: Mon Oct 15 17:46:54 2012
New Revision: 1398419
URL: http://svn.apache.org/viewvc?rev=1398419&view=rev
Log:
Remove the System.out lines from the test, use LOG instead.
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java?rev=1398419&r1=1398418&r2=1398419&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java Mon Oct 15 17:46:54 2012
@@ -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 JmsSendWithAsyncCallbackTes
}
super.tearDown();
}
-
public void testAsyncCallbackIsFaster() throws JMSException, InterruptedException {
connection.start();
@@ -67,8 +78,8 @@ public class JmsSendWithAsyncCallbackTes
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 JmsSendWithAsyncCallbackTes
messagesSent.await();
return 1000.0 * count / (System.currentTimeMillis() - start);
}
-
}