diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2010-05-18 00:23:41 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2010-05-18 00:23:41 +0000 |
| commit | ef8824b936581a3381cc374e083e1cd3755a095c (patch) | |
| tree | 567703957e187c9cfef7e244bcfed5e34fe6863c /java | |
| parent | 499a1cdc238e7ed738dc26aca74b1e47d218d451 (diff) | |
| download | qpid-python-ef8824b936581a3381cc374e083e1cd3755a095c.tar.gz | |
This test is failed due to the checkin made in rev 942293 as a fix for QPID-2559.
Since (from rev 942293) credit is not sent if the dispatcher is null, for consumerB, credit is not sent until it invokes receive().
However it only tries to receive after consumerA has received 2 messages. Since AUTO-ACK is used, completions are sent immediately which results in A receiving credit, hence receiving the next 2 messages as well.
I changed the test to create consumer A & B using the same session. This ensures that both consumers gets a chance to request credit before they consume any messages. This modification does not alter the intent of the original test case.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@945444 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java index d08eee3e83..e434d83454 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java @@ -230,8 +230,7 @@ public class AMQConnectionTest extends QpidTestCase producer.send(producerSession.createTextMessage("test")); } - Session consSessB = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE); - MessageConsumer consumerB = consSessB.createConsumer(_queue); + MessageConsumer consumerB = consSessA.createConsumer(_queue); Message msg; // Check that consumer A has 2 messages |
