summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-10-18 12:53:46 +0000
committerGordon Sim <gsim@apache.org>2007-10-18 12:53:46 +0000
commitb5e7a9557c025f9ed8dc599ebf7a19890875a4c6 (patch)
tree839ed8f3b67bf6c9d27047281b5ac551c7b5b3f7 /qpid/python
parenta8fbf191ec5abaf39585650ce5d0e6fabf8e88cf (diff)
downloadqpid-python-b5e7a9557c025f9ed8dc599ebf7a19890875a4c6.tar.gz
Fixed return of acquired message ranges (and added tests)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@585952 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/tests_0-10/message.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/qpid/python/tests_0-10/message.py b/qpid/python/tests_0-10/message.py
index 8212c7be67..0fcc38caa0 100644
--- a/qpid/python/tests_0-10/message.py
+++ b/qpid/python/tests_0-10/message.py
@@ -571,11 +571,19 @@ class MessageTests(TestBase):
self.subscribe(queue = "q", destination = "a", acquire_mode = 1, confirm_mode = 1)
msg = self.client.queue("a").get(timeout = 1)
- channel.message_acquire([msg.command_id, msg.command_id])
- msg.complete()
+ #message should still be on the queue:
+ self.assertEquals(1, channel.queue_query(queue = "q").message_count)
+ channel.message_acquire([msg.command_id, msg.command_id])
+ #check that we get notification (i.e. message_acquired)
+ response = channel.control_queue.get(timeout=1)
+ self.assertEquals(response.transfers, [msg.command_id, msg.command_id])
#message should have been removed from the queue:
self.assertEquals(0, channel.queue_query(queue = "q").message_count)
+ msg.complete()
+
+
+
def test_release(self):
"""