From fb5a3730db561c0567d8f84625689ee5e46cb95b Mon Sep 17 00:00:00 2001 From: James Strachan Date: Fri, 11 Aug 2006 08:00:03 +0000 Subject: [PATCH] modified test case to use TCP to force marshalling of the MesagePull command to check thats working git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@430716 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/activemq/TestSupport.java | 10 +++++++++- .../org/apache/activemq/ZeroPrefetchConsumerTest.java | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/activemq-core/src/test/java/org/apache/activemq/TestSupport.java b/activemq-core/src/test/java/org/apache/activemq/TestSupport.java index 9f9053c400..dce7b56bb7 100755 --- a/activemq-core/src/test/java/org/apache/activemq/TestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/TestSupport.java @@ -68,9 +68,17 @@ public class TestSupport extends TestCase { } protected Destination createDestination() { - return createDestination(getClass().getName() + "." + getName()); + return createDestination(getDestinationString()); } + /** + * Returns the name of the destination used in this test case + */ + protected String getDestinationString() { + return getClass().getName() + "." + getName(); + } + + /** * @param messsage * @param firstSet diff --git a/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java b/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java index aa1473dfe3..2208ebfefe 100644 --- a/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java @@ -34,7 +34,7 @@ import javax.jms.Session; * * @version $Revision$ */ -public class ZeroPrefetchConsumerTest extends TestSupport { +public class ZeroPrefetchConsumerTest extends EmbeddedBrokerTestSupport { private static final Log log = LogFactory.getLog(ZeroPrefetchConsumerTest.class); @@ -68,7 +68,7 @@ public class ZeroPrefetchConsumerTest extends TestSupport { } protected void setUp() throws Exception { - topic = false; + bindAddress = "tcp://localhost:61616"; super.setUp(); connection = createConnection(); @@ -82,7 +82,7 @@ public class ZeroPrefetchConsumerTest extends TestSupport { } protected Queue createQueue() { - return new ActiveMQQueue(getClass().getName() + "." + getName() + "?consumer.prefetchSize=0"); + return new ActiveMQQueue(getDestinationString() + "?consumer.prefetchSize=0"); } }