mirror of https://github.com/apache/activemq.git
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:
parent
80d0605682
commit
6473236e34
|
@ -39,6 +39,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
|
||||||
|
|
||||||
private Connection connection;
|
private Connection connection;
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
connection = createConnection();
|
connection = createConnection();
|
||||||
|
@ -47,6 +48,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
|
||||||
/**
|
/**
|
||||||
* @see junit.framework.TestCase#tearDown()
|
* @see junit.framework.TestCase#tearDown()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.close();
|
connection.close();
|
||||||
|
@ -70,7 +72,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
|
||||||
});
|
});
|
||||||
|
|
||||||
// warmup...
|
// warmup...
|
||||||
for(int i=0; i < 10; i++) {
|
for (int i = 0; i < 10; i++) {
|
||||||
benchmarkNonCallbackRate();
|
benchmarkNonCallbackRate();
|
||||||
benchmarkCallbackRate();
|
benchmarkCallbackRate();
|
||||||
}
|
}
|
||||||
|
@ -82,7 +84,7 @@ public class JmsSendWithAsyncCallbackTest extends TestSupport {
|
||||||
LOG.info(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("async rate[" + callbackRate + "] should beat non-async rate[" + nonCallbackRate + "]", callbackRate / nonCallbackRate > 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private double benchmarkNonCallbackRate() throws JMSException {
|
private double benchmarkNonCallbackRate() throws JMSException {
|
||||||
|
|
Loading…
Reference in New Issue