You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2011/10/30 19:43:33 UTC

svn commit: r1195214 - /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java

Author: robbie
Date: Sun Oct 30 18:43:32 2011
New Revision: 1195214

URL: http://svn.apache.org/viewvc?rev=1195214&view=rev
Log:
NO-JIRA: correct test issue causing failures on the Jenkins slaves during persistent runs. Make the producer use transactions to ensure messages have actually all been enqueued before consumption begins, as the test assumptions may be invalid if the havent.

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java

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=1195214&r1=1195213&r2=1195214&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java Sun Oct 30 18:43:32 2011
@@ -205,7 +205,7 @@ public class AMQConnectionTest extends Q
         Session consSessA = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
         MessageConsumer consumerA = consSessA.createConsumer(_queue);
 
-        Session producerSession = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        Session producerSession = _connection.createSession(true, Session.SESSION_TRANSACTED);
         MessageProducer producer = producerSession.createProducer(_queue);
 
         // Send 3 messages
@@ -213,6 +213,7 @@ public class AMQConnectionTest extends Q
         {
             producer.send(producerSession.createTextMessage("test"));
         }
+        producerSession.commit();
         
         MessageConsumer consumerB = null;
         // 0-8, 0-9, 0-9-1 prefetch is per session, not consumer.



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