From 93e7f636f8b4fb184362c145f9162afeb704d9bf Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Fri, 2 Feb 2007 11:13:13 +0000 Subject: QPID-343 Performance test suite doesn't output missing message count on failure. Updated PingAsyncTestPerf to output missing messsage count. Updated PingPongProducer so it doesn't use AMQShortStringx. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@502576 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/qpid/requestreply/PingPongProducer.java | 14 ++++++++------ .../test/java/org/apache/qpid/ping/PingAsyncTestPerf.java | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'java/perftests/src') diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index 7c5bb92a57..ce64a40217 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -34,9 +34,13 @@ import javax.jms.*; import org.apache.log4j.Logger; -import org.apache.qpid.client.*; + import org.apache.qpid.client.message.TestMessageFactory; -import org.apache.qpid.framing.AMQShortString; +import org.apache.qpid.client.AMQConnection; +import org.apache.qpid.client.AMQDestination; +import org.apache.qpid.client.AMQTopic; +import org.apache.qpid.client.AMQQueue; +import org.apache.qpid.client.AMQNoConsumersException; import org.apache.qpid.jms.MessageProducer; import org.apache.qpid.jms.Session; import org.apache.qpid.topic.Config; @@ -570,14 +574,12 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis // Check if this is a pub/sub pinger, in which case create topics. if (_isPubSub) { - AMQShortString name = new AMQShortString(rootName + id); - destination = new AMQTopic(name); + destination = new AMQTopic(rootName + id); } // Otherwise this is a p2p pinger, in which case create queues. else { - AMQShortString name = new AMQShortString(rootName + id); - destination = new AMQQueue(name, name, false, false, false); + destination = new AMQQueue(rootName + id); } // Keep the destination. diff --git a/java/perftests/src/test/java/org/apache/qpid/ping/PingAsyncTestPerf.java b/java/perftests/src/test/java/org/apache/qpid/ping/PingAsyncTestPerf.java index e10e6353b7..27de27faf3 100644 --- a/java/perftests/src/test/java/org/apache/qpid/ping/PingAsyncTestPerf.java +++ b/java/perftests/src/test/java/org/apache/qpid/ping/PingAsyncTestPerf.java @@ -171,7 +171,7 @@ public class PingAsyncTestPerf extends PingTestPerf implements TimingControllerA // Check that all the replies were received and log a fail if they were not. if (numReplies < numPings) { - tc.completeTest(false, 0); + tc.completeTest(false, numPings - numReplies); } // Remove the chained message listener from the ping producer. -- cgit v1.2.1