diff options
| author | Robert Gemmell <robbie@apache.org> | 2012-09-21 15:43:04 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2012-09-21 15:43:04 +0000 |
| commit | 2ebdd42622807564e81f8b0bd4a62d689bfc1ce6 (patch) | |
| tree | 9dfcdd797af079595f57631930c6ac58a41e7f47 /qpid/java/perftests/src/test | |
| parent | 1d55085f6f4fdf1a29ae7a468b189dabf9badef1 (diff) | |
| download | qpid-python-2ebdd42622807564e81f8b0bd4a62d689bfc1ce6.tar.gz | |
QPID-4311: throw exception if the test config requests a start delay greater than the imposed maximum time limit for the test. Add some additional logging, extract some variables for clarity.
Work by Oleksandr Rudyy and myself.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1388556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests/src/test')
| -rw-r--r-- | qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ProducerParticipantTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ProducerParticipantTest.java b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ProducerParticipantTest.java index ce36fdb9ad..cafb63d071 100644 --- a/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ProducerParticipantTest.java +++ b/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ProducerParticipantTest.java @@ -145,6 +145,23 @@ public class ProducerParticipantTest extends TestCase verify(_delegate, atLeastOnce()).commitIfNecessary(SESSION_NAME1); } + public void testSendMessagesForDurationWithDelayExceedingDuration() throws Exception + { + final long duration = 100; + _command.setMaximumDuration(duration); + _command.setStartDelay(150); + + try + { + _producer.doIt(CLIENT_NAME); + fail("Exception should be thrown indicating configuration error"); + } + catch(DistributedTestException e) + { + assertEquals("Start delay must be less than maximum test duration", e.getMessage()); + } + } + public void testSendMessageBatches() throws Exception { final int batchSize = 3; |
