From e77ead1fcc4ab32323a1a1212e42498ed6c4b60e Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 18 Oct 2007 12:53:46 +0000 Subject: Fixed return of acquired message ranges (and added tests) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@585952 13f79535-47bb-0310-9956-ffa450edef68 --- python/tests_0-10/message.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/tests_0-10/message.py b/python/tests_0-10/message.py index 8212c7be67..0fcc38caa0 100644 --- a/python/tests_0-10/message.py +++ b/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): """ -- cgit v1.2.1