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 | 312c15a3daeb89956b58540f55f65145062bda7a (patch) | |
| tree | 8bb97ade0cb3b39b8c3e6ca0eba65d2bfebe05e5 /python | |
| parent | 0c2cb42f6c8fc93184b381a34c4a8c16e6d7759b (diff) | |
| download | qpid-python-312c15a3daeb89956b58540f55f65145062bda7a.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/qpid@725483 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/tests_0-10/queue.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/python/tests_0-10/queue.py b/python/tests_0-10/queue.py index a3b23a1c32..05e18081fa 100644 --- a/python/tests_0-10/queue.py +++ b/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): |
