diff options
| author | Gordon Sim <gsim@apache.org> | 2008-12-10 23:23:24 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-12-10 23:23:24 +0000 |
| commit | d50fa64fa49b18ae284a1963233849c106683c58 (patch) | |
| tree | 51d0c6e0d472f9c4e0a308aea65c086e506bc5cc /qpid/python | |
| parent | 97121a285ae6293057b7a8ebcb2c72e0b4721555 (diff) | |
| download | qpid-python-d50fa64fa49b18ae284a1963233849c106683c58.tar.gz | |
QPID-1526: add checks for exclusive ownership plus tests to verify they are executed
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@725483 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
| -rw-r--r-- | qpid/python/tests_0-10/queue.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/qpid/python/tests_0-10/queue.py b/qpid/python/tests_0-10/queue.py index a3b23a1c32..05e18081fa 100644 --- a/qpid/python/tests_0-10/queue.py +++ b/qpid/python/tests_0-10/queue.py @@ -88,7 +88,7 @@ class QueueTests(TestBase010): # TestBase.setUp has already opened session(1) s1 = self.session # Here we open a second separate connection: - s2 = self.conn.session("other", 2) + s2 = self.conn.session("other") #declare an exclusive queue: s1.queue_declare(queue="exclusive-queue", exclusive=True, auto_delete=True) @@ -98,6 +98,22 @@ class QueueTests(TestBase010): self.fail("Expected second exclusive queue_declare to raise a channel exception") except SessionException, e: self.assertEquals(405, e.args[0].error_code) + + s3 = self.conn.session("subscriber") + try: + #other connection should not be allowed to declare this: + s3.message_subscribe(queue="exclusive-queue") + self.fail("Expected message_subscribe on an exclusive queue to raise a channel exception") + except SessionException, e: + self.assertEquals(405, e.args[0].error_code) + + s4 = self.conn.session("deleter") + try: + #other connection should not be allowed to declare this: + s4.queue_delete(queue="exclusive-queue") + self.fail("Expected queue_delete on an exclusive queue to raise a channel exception") + except SessionException, e: + self.assertEquals(405, e.args[0].error_code) def test_declare_passive(self): |
