From c5eef2d95119a0f7b67d5d37d393388e0103333d Mon Sep 17 00:00:00 2001 From: Rajith Muditha Attapattu Date: Tue, 18 May 2010 00:23:41 +0000 Subject: 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@945444 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qpid/java') 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 d08eee3e83..e434d83454 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 @@ -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 -- cgit v1.2.1