diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-05-03 23:35:56 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-05-03 23:35:56 +0000 |
| commit | d1b055801ad6f433e75fc57bf835126494a3eeef (patch) | |
| tree | 123610895e037a5b492fbd4462737a49224584c6 /qpid/java | |
| parent | 846412262fc00e9e95119a8781516336ccb0f9c9 (diff) | |
| download | qpid-python-d1b055801ad6f433e75fc57bf835126494a3eeef.tar.gz | |
Removed assertions based on wrong assumptions.
The c++ broker does not make any guarantees about how it distributes the messages among consumers on a single queue.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@940674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java index 0ab4e33f30..78240dde71 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java @@ -213,27 +213,26 @@ public class AMQConnectionTest extends QpidTestCase // Send 3 messages for (int i = 0; i < 3; i++) { - producer.send(producerSession.createTextMessage(new Integer(i).toString())); + producer.send(producerSession.createTextMessage("test")); } + Session consSessB = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE); MessageConsumer consumerB = consSessB.createConsumer(_queue); Message msg; - // Check that one consumer has 2 messages + // Check that consumer A has 2 messages for (int i = 0; i < 2; i++) { msg = consumerA.receive(1500); - assertNotNull(msg); - assertEquals(new Integer(i).toString(), ((TextMessage) msg).getText()); + assertNotNull("Consumer A should receive 2 messages",msg); } msg = consumerA.receive(1500); - assertNull(msg); + assertNull("Consumer A should not have received a 3rd message",msg); - // Check that other consumer has last message + // Check that consumer B has the last message msg = consumerB.receive(1500); - assertNotNull(msg); - assertEquals(new Integer(2).toString(), ((TextMessage) msg).getText()); + assertNotNull("Consumer B should have received the message",msg); } finally { |
