summaryrefslogtreecommitdiff
path: root/qpid/java/perftests/src
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-08-05 11:10:28 +0000
committerAidan Skinner <aidan@apache.org>2008-08-05 11:10:28 +0000
commit30102c08501c25704eb0e03c392c487b5e92b8d0 (patch)
tree8fb9c1da3c97e8f38a631342c82648d3a91bcd24 /qpid/java/perftests/src
parent5f78c14c327740982d6432a1f305744e4daddc9a (diff)
downloadqpid-python-30102c08501c25704eb0e03c392c487b5e92b8d0.tar.gz
QPID-1206: Fix failover and failover tests
AMQConnection: remove dead and confusingly misnamed method AMQSession: rename failedOver to failedOverDirty to convey actual usage, only set it if we failed over while dirty. Ewww! BasicMessageConsumer: if we're in client ack mode, mark as dirty when we receive a message PingPongProducer: calculate expected replies properly if we fail after a send or before a commit FailoverTest: test transacted case git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@682672 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests/src')
-rw-r--r--qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
index 4d8a736ec8..f994cd138e 100644
--- a/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
+++ b/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
@@ -1673,11 +1673,9 @@ public class PingPongProducer implements Runnable, ExceptionListener
*/
public int getExpectedNumPings(int numpings)
{
- // log.debug("public int getExpectedNumPings(int numpings = " + numpings + "): called");
-
- // log.debug("Each ping will be received by " + (_isPubSub ? getConsumersPerDestination() : 1) + " consumers.");
-
- return numpings * (_isPubSub ? getConsumersPerDestination() : 1);
+ // Wow, I'm freaking sorry about this return here...
+ return ((_failAfterSend || _failBeforeCommit) ? numpings - 1: numpings) *
+ (_isPubSub ? getConsumersPerDestination() : 1);
}
/**