diff options
author | Robert Gemmell <robbie@apache.org> | 2011-10-30 18:43:32 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2011-10-30 18:43:32 +0000 |
commit | 64accfb0c0b0ab176e6f770abad2c77eb0d8b0ff (patch) | |
tree | e8026b97837efc41e67282f0c047b0ebcc908d19 | |
parent | 4ffd5cd3936a5c31b7009acead178bc368170912 (diff) | |
download | qpid-python-64accfb0c0b0ab176e6f770abad2c77eb0d8b0ff.tar.gz |
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
-rw-r--r-- | qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
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. |