activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1438272 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendWithAsyncCallbackTest.java
Date Thu, 24 Jan 2013 23:59:04 GMT
Author: tabish
Date: Thu Jan 24 23:59:04 2013
New Revision: 1438272

URL: http://svn.apache.org/viewvc?rev=1438272&view=rev
Log:
Add an information message to the assert so we can see how much it failed by. 

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=1438272&r1=1438271&r2=1438272&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
Thu Jan 24 23:59:04 2013
@@ -39,6 +39,7 @@ public class JmsSendWithAsyncCallbackTes
 
     private Connection connection;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         connection = createConnection();
@@ -47,6 +48,7 @@ public class JmsSendWithAsyncCallbackTes
     /**
      * @see junit.framework.TestCase#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         if (connection != null) {
             connection.close();
@@ -70,7 +72,7 @@ public class JmsSendWithAsyncCallbackTes
         });
 
         // warmup...
-        for(int i=0; i < 10; i++) {
+        for (int i = 0; i < 10; i++) {
             benchmarkNonCallbackRate();
             benchmarkCallbackRate();
         }
@@ -82,7 +84,7 @@ public class JmsSendWithAsyncCallbackTes
         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 );
+        assertTrue("async rate[" + callbackRate + "] should beat non-async rate[" + nonCallbackRate
+ "]", callbackRate / nonCallbackRate > 1.5);
     }
 
     private double benchmarkNonCallbackRate() throws JMSException {



Mime
View raw message