All Java test writers It would make the test code much easier to read if we use Session.TRANSACTED_SESSION when we really mean to create a transacted session: The intent of the following line is unclear: > + Session consSessB = _connection.createSession(true, > Session.AUTO_ACKNOWLEDGE);
Rajith did you want a Transacted session here? Martin On 18 May 2010 18:53, <[email protected]> wrote: > Author: rajith > Date: Tue May 18 17:53:02 2010 > New Revision: 945789 > > URL: http://svn.apache.org/viewvc?rev=945789&view=rev > Log: > Modified the test slightly to make it work against the 0-10 code path. > Verified that it works against the C++ broker and the Java broker (both 0-8 > and 0-10 codepaths). > > 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=945789&r1=945788&r2=945789&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 > Tue May 18 17:53:02 2010 > @@ -230,7 +230,16 @@ public class AMQConnectionTest extends Q > producer.send(producerSession.createTextMessage("test")); > } > > - MessageConsumer consumerB = consSessA.createConsumer(_queue); > + MessageConsumer consumerB = null; > + if (isBroker08()) > + { > + Session consSessB = _connection.createSession(true, > Session.AUTO_ACKNOWLEDGE); > + consumerB = consSessB.createConsumer(_queue); > + } > + else > + { > + 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:[email protected] > > -- Martin Ritchie --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
