diff options
author | Aidan Skinner <aidan@apache.org> | 2008-05-12 11:14:45 +0000 |
---|---|---|
committer | Aidan Skinner <aidan@apache.org> | 2008-05-12 11:14:45 +0000 |
commit | 716bf9a824491e93f39bc79ccd0caf9fbb36f2ee (patch) | |
tree | 8b9a6460639345a767929d2f5ab0fb6ef478f4c0 /java/systests/src | |
parent | 4cf2baa090c723b97a486bdb582ce07ff3a6c190 (diff) | |
download | qpid-python-716bf9a824491e93f39bc79ccd0caf9fbb36f2ee.tar.gz |
QPID-839 fix test to avoid potential race condition and general incorrectness
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1.x@655470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src')
-rw-r--r-- | java/systests/src/main/java/org/apache/qpid/test/client/DupsOkTest.java | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/client/DupsOkTest.java b/java/systests/src/main/java/org/apache/qpid/test/client/DupsOkTest.java index 463946e14a..574c4f899f 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/client/DupsOkTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/client/DupsOkTest.java @@ -106,24 +106,9 @@ public class DupsOkTest extends VMTestCase if (message.getIntProperty("count") == MSG_COUNT) { - try - { - long remainingMessages = ((AMQSession) clientSession).getQueueDepth((AMQDestination) _queue); - if(remainingMessages != 0) - { - - assertEquals("The queue should have 0 msgs left, seen " + _msgCount + " messages.", 0, getMessageCount(_queue.getQueueName())); - } - } - catch (AMQException e) - { - assertNull("Got AMQException", e); - } - finally - { - //This is the last message so release test. - _awaitCompletion.countDown(); - } + assertEquals("Should have recieved all messages now", _msgCount, MSG_COUNT); + //This is the last message so release test. + _awaitCompletion.countDown(); } } |