diff options
author | Keith Wall <kwall@apache.org> | 2015-06-18 17:41:08 +0000 |
---|---|---|
committer | Keith Wall <kwall@apache.org> | 2015-06-18 17:41:08 +0000 |
commit | 73cbc536291ce70bae22dff47b215f5e9009b033 (patch) | |
tree | df74bc628a87f3ab9c2d081b31b6bfe88240cf19 | |
parent | e0efbeadd81384605870055a2703dd425c6a93ad (diff) | |
download | qpid-python-73cbc536291ce70bae22dff47b215f5e9009b033.tar.gz |
QPID-6599: [Python Tests AMQP 0-10] Supporting test for Java Broker Defect
Verify that it is possible to declare a reserved exchange with the same type, conversely
verify that attempting to redeclare an reserved exchange with a different type causes error.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1686284 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | tests/src/py/qpid_tests/broker_0_10/exchange.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/src/py/qpid_tests/broker_0_10/exchange.py b/tests/src/py/qpid_tests/broker_0_10/exchange.py index 53de37f12c..4edefc0abb 100644 --- a/tests/src/py/qpid_tests/broker_0_10/exchange.py +++ b/tests/src/py/qpid_tests/broker_0_10/exchange.py @@ -96,8 +96,9 @@ class TestHelper(TestBase010): auto_delete=False, arguments={}): session = session or self.session - reply = session.exchange_declare(exchange=exchange, type=type, passive=passive,durable=durable, auto_delete=auto_delete, arguments=arguments) - self.exchanges.append((session,exchange)) + reply = session.exchange_declare(exchange=exchange, type=type, passive=passive, durable=durable, auto_delete=auto_delete, arguments=arguments) + if exchange and not exchange.startswith("amq."): + self.exchanges.append((session,exchange)) return reply def uniqueString(self): @@ -483,6 +484,17 @@ class MiscellaneousErrorsTests(TestHelper): except SessionException, e: self.assertEquals(530, e.args[0].error_code) + def testReservedExchangeRedeclaredSameType(self): + self.exchange_declare(exchange="amq.direct", type="direct", passive=False) + self.exchange_declare(exchange="amq.direct", type="direct", passive=True) + + def testReservedExchangeRedeclaredDifferentType(self): + try: + self.exchange_declare(exchange="amq.direct", type="topic") + self.fail("Expected 530 for redeclaration of exchange with different type.") + except SessionException, e: + self.assertEquals(530, e.args[0].error_code) + def testDefaultAccessBind(self): try: self.session.queue_declare(queue="my-queue", auto_delete=True, exclusive=True) |