Add an information message to the assert so we can see how much it failed by.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1438272 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2013-01-24 23:59:04 +00:00
parent 80d0605682
commit 6473236e34
1 changed files with 4 additions and 2 deletions

View File

@ -39,6 +39,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
private Connection connection;
@Override
protected void setUp() throws Exception {
super.setUp();
connection = createConnection();
@ -47,6 +48,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
/**
* @see junit.framework.TestCase#tearDown()
*/
@Override
protected void tearDown() throws Exception {
if (connection != null) {
connection.close();
@ -70,7 +72,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
});
// warmup...
for(int i=0; i < 10; i++) {
for (int i = 0; i < 10; i++) {
benchmarkNonCallbackRate();
benchmarkCallbackRate();
}
@ -82,7 +84,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
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 {