summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-03-01 08:50:38 +0000
committerKeith Wall <kwall@apache.org>2012-03-01 08:50:38 +0000
commitd1215ef0cf64a9f27d13c1406d91de1f5f487539 (patch)
tree256827033318e161ee7ef400449a096562e2c5f6
parent13a449fb5f416f83e242492bc4610f5f4dd5bbe4 (diff)
downloadqpid-python-d1215ef0cf64a9f27d13c1406d91de1f5f487539.tar.gz
QPID-3599: Python session tests fail against the Java Broker due to unexpected redelivered status
Changed Java Broker so once a message is acknowledged, if the session is transactional and the transaction is rolled-back, the queue entry is marked as redelivered. The rationale is that if the client has acknowledged, then it is certain they have seen it/them. The python tests testCommitAck and testRollback highlighted this defect as they acknowledge the session before rollback (something that is impossible to control from the JMS API). Python tests reenabled against the Java Broker: qpid.tests.messaging.endpoints.SessionTests.testCommitAck qpid.tests.messaging.endpoints.SessionTests.testRelease qpid.tests.messaging.endpoints.SessionTests.testRollback Work of Robbie Gemmell <robbie@apache.org> and myself. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1295474 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java3
-rw-r--r--qpid/java/test-profiles/python_tests/Java010PythonExcludes4
2 files changed, 3 insertions, 4 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
index c51b17c447..9f7b8c53b8 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
@@ -403,6 +403,9 @@ public class ServerSession extends Session
public void onRollback()
{
+ // The client has acknowledge the message and therefore have seen it.
+ // In the event of rollback, the message must be marked as redelivered.
+ entry.setRedelivered();
entry.release();
}
});
diff --git a/qpid/java/test-profiles/python_tests/Java010PythonExcludes b/qpid/java/test-profiles/python_tests/Java010PythonExcludes
index fd40ebd858..13f9d5484e 100644
--- a/qpid/java/test-profiles/python_tests/Java010PythonExcludes
+++ b/qpid/java/test-profiles/python_tests/Java010PythonExcludes
@@ -67,7 +67,3 @@ qpid_tests.broker_0_10.message.MessageTests.test_window_flow_bytes
#QPID-3605 Durable subscriber with no-local true receives messages on re-connection
qpid_tests.broker_0_10.message.MessageTests.test_no_local_awkward
-#QPID-3599 Tests fail due to differences in expected message Redelivered status
-qpid.tests.messaging.endpoints.SessionTests.testCommitAck
-qpid.tests.messaging.endpoints.SessionTests.testRelease
-qpid.tests.messaging.endpoints.SessionTests.testRollback