From e4be6373770e2e639aec8ca25f076990b9823e94 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Tue, 23 Jan 2007 10:55:00 +0000 Subject: FailOver added flag FAIL_ONCE so that only the first call is stopped for failover.. the default. Updated POM with Failover Tests git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@498984 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/test/java/org/apache/qpid/ping/PingTestPerf.java | 10 ++++++---- .../java/org/apache/qpid/requestreply/PingPongTestPerf.java | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'java/perftests/src/test') diff --git a/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java b/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java index e416d31031..446888f8c1 100644 --- a/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java +++ b/java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java @@ -122,7 +122,7 @@ public class PingTestPerf extends AsymptoticTestCase //implements TimingControll private static final String FAIL_AFTER_SEND = "FailAfterSend"; private static final String FAIL_BEFORE_SEND = "FailBeforeSend"; private static final String BATCH_SIZE = "BatchSize"; - + private static final String FAIL_ONCE = "FailOnce"; /** @@ -147,6 +147,7 @@ public class PingTestPerf extends AsymptoticTestCase //implements TimingControll setSystemPropertyIfNull(FAIL_BEFORE_COMMIT, "false"); setSystemPropertyIfNull(FAIL_AFTER_SEND, "false"); setSystemPropertyIfNull(FAIL_BEFORE_SEND, "false"); + setSystemPropertyIfNull(FAIL_ONCE, "true"); setSystemPropertyIfNull(BATCH_SIZE, Integer.toString(BATCH_SIZE_DEFAULT)); setSystemPropertyIfNull(MESSAGE_SIZE_PROPNAME, Integer.toString(MESSAGE_SIZE_DEFAULT)); @@ -156,7 +157,7 @@ public class PingTestPerf extends AsymptoticTestCase //implements TimingControll setSystemPropertyIfNull(BROKER_PROPNAME, BROKER_DEFAULT); setSystemPropertyIfNull(VIRTUAL_PATH_PROPNAME, VIRTUAL_PATH_DEFAULT); setSystemPropertyIfNull(TIMEOUT_PROPNAME, Long.toString(TIMEOUT_DEFAULT)); - setSystemPropertyIfNull(PING_QUEUE_COUNT_PROPNAME, Integer.toString(1)); + setSystemPropertyIfNull(PING_QUEUE_COUNT_PROPNAME, Integer.toString(1)); } /** @@ -246,6 +247,7 @@ public class PingTestPerf extends AsymptoticTestCase //implements TimingControll boolean beforeCommit = Boolean.parseBoolean(testParameters.getProperty(FAIL_BEFORE_COMMIT)); boolean afterSend = Boolean.parseBoolean(testParameters.getProperty(FAIL_AFTER_SEND)); boolean beforeSend = Boolean.parseBoolean(testParameters.getProperty(FAIL_BEFORE_SEND)); + boolean failOnce = Boolean.parseBoolean(testParameters.getProperty(FAIL_ONCE)); int batchSize = Integer.parseInt(testParameters.getProperty(BATCH_SIZE)); @@ -256,7 +258,7 @@ public class PingTestPerf extends AsymptoticTestCase //implements TimingControll perThreadSetup._pingItselfClient = new TestPingItself(brokerDetails, username, password, virtualpath, selector, transacted, persistent, messageSize, verbose, - afterCommit, beforeCommit, afterSend, beforeSend, + afterCommit, beforeCommit, afterSend, beforeSend, failOnce, batchSize, queueCount); } else @@ -265,7 +267,7 @@ public class PingTestPerf extends AsymptoticTestCase //implements TimingControll perThreadSetup._pingItselfClient = new TestPingItself(brokerDetails, username, password, virtualpath, queueName, selector, transacted, persistent, messageSize, verbose, - afterCommit, beforeCommit, afterSend, beforeSend, + afterCommit, beforeCommit, afterSend, beforeSend, failOnce, batchSize); } diff --git a/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java b/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java index 3e1035ce05..df0508c881 100644 --- a/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java +++ b/java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java @@ -136,6 +136,7 @@ public class PingPongTestPerf extends AsymptoticTestCase //implements TimingCont private static final String FAIL_AFTER_SEND = "FailAfterSend"; private static final String FAIL_BEFORE_SEND = "FailBeforeSend"; private static final String BATCH_SIZE = "BatchSize"; + private static final String FAIL_ONCE = "FailOnce"; public PingPongTestPerf(String name) @@ -221,6 +222,7 @@ public class PingPongTestPerf extends AsymptoticTestCase //implements TimingCont boolean afterSend = Boolean.parseBoolean(testParameters.getProperty(FAIL_AFTER_SEND)); boolean beforeSend = Boolean.parseBoolean(testParameters.getProperty(FAIL_BEFORE_SEND)); int batchSize = Integer.parseInt(testParameters.getProperty(BATCH_SIZE)); + Boolean failOnce = Boolean.parseBoolean(testParameters.getProperty(FAIL_ONCE)); // Establish a bounce back client on the ping queue to bounce back the pings. perThreadSetup._testPingBouncer = new PingPongBouncer(brokerDetails, username, password, virtualpath, queueName, @@ -233,7 +235,7 @@ public class PingPongTestPerf extends AsymptoticTestCase //implements TimingCont perThreadSetup._testPingProducer = new PingPongProducer(brokerDetails, username, password, virtualpath, queueName, selector, transacted, persistent, messageSize, verbose, - afterCommit, beforeCommit, afterSend, beforeSend, + afterCommit, beforeCommit, afterSend, beforeSend, failOnce, batchSize, 0); perThreadSetup._testPingProducer.getConnection().start(); -- cgit v1.2.1