qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject svn commit: r945444 - /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
Date Tue, 18 May 2010 00:23:41 GMT
Author: rajith
Date: Tue May 18 00:23:41 2010
New Revision: 945444

URL: http://svn.apache.org/viewvc?rev=945444&view=rev
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.


Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java?rev=945444&r1=945443&r2=945444&view=diff
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
Tue May 18 00:23:41 2010
@@ -230,8 +230,7 @@ public class AMQConnectionTest extends Q
-            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

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org

View raw message