tests_0-9.QueueTests.test_unbind_* reuses exclusive queues
----------------------------------------------------------
Key: QPID-2136
URL: https://issues.apache.org/jira/browse/QPID-2136
Project: Qpid
Issue Type: Bug
Components: Python Test Suite
Reporter: Michael Bridgen
The test_unbind_{direct, topic, fanout, headers} tests all go through the
method unbind_test, which declares two exclusive queues. Since they are
exclusive, and not explicitly deleted after the test, the next such test can
fail with a "405 RESOURCE_LOCKED".
In AMQP 0-9 the exclusive queues should be deleted when the connection is
closed (which happens in TestBase.tearDown). I would prefer not to rely on
this though, since there is a race between the server deleting the queue and
the next test running.
The solution is to register the queues to be explicitly deleted after the test
is run:
Index: tests_0-9/queue.py
===================================================================
--- tests_0-9/queue.py (revision 822337)
+++ tests_0-9/queue.py (working copy)
@@ -40,8 +40,8 @@
#bind two queues and consume from them
channel = self.channel
- channel.queue_declare(queue="queue-1", exclusive="True")
- channel.queue_declare(queue="queue-2", exclusive="True")
+ self.queue_declare(queue="queue-1", exclusive="True")
+ self.queue_declare(queue="queue-2", exclusive="True")
channel.basic_consume(queue="queue-1", consumer_tag="queue-1",
no_ack=True)
channel.basic_consume(queue="queue-2", consumer_tag="queue-2",
no_ack=True)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]