diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java index e293b45824..99778d03c4 100755 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/TransactionTest.java @@ -17,7 +17,9 @@ package org.apache.activemq.usecases; import java.util.Date; +import java.util.Map; import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; import javax.jms.Connection; import javax.jms.Destination; @@ -56,7 +58,7 @@ public final class TransactionTest extends TestCase { public void testTransaction() throws Exception { - ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); + ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); connection = factory.createConnection(); queue = new ActiveMQQueue(getClass().getName() + "." + getName()); @@ -104,8 +106,20 @@ public final class TransactionTest extends TestCase { } LOG.info("Waiting for latch"); - latch.await(); - + latch.await(2,TimeUnit.SECONDS); + if (receivedText==null) { + /* + Map map = Thread.getAllStackTraces(); + for (Map.Entry entry: map.entrySet()) { + System.out.println(entry.getKey()); + for (StackTraceElement element :entry.getValue()) { + System.out.println(element); + } + } + */ + fail("No message received"); + } + assertNotNull(receivedText); LOG.info("test completed, destination=" + receivedText); }