diff options
Diffstat (limited to 'java/perftests/src/test')
| -rw-r--r-- | java/perftests/src/test/java/org/apache/qpid/ping/PingTestPerf.java | 10 | ||||
| -rw-r--r-- | java/perftests/src/test/java/org/apache/qpid/requestreply/PingPongTestPerf.java | 4 |
2 files changed, 9 insertions, 5 deletions
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();
|
