From 64accfb0c0b0ab176e6f770abad2c77eb0d8b0ff Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Sun, 30 Oct 2011 18:43:32 +0000 Subject: 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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1195214 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 53a7533869..57ff6a4fa2 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 @@ -205,7 +205,7 @@ public class AMQConnectionTest extends QpidBrokerTestCase 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 QpidBrokerTestCase { producer.send(producerSession.createTextMessage("test")); } + producerSession.commit(); MessageConsumer consumerB = null; // 0-8, 0-9, 0-9-1 prefetch is per session, not consumer. -- cgit v1.2.1