summaryrefslogtreecommitdiff
path: root/python/tests
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-01-18 08:14:36 +0000
committerGordon Sim <gsim@apache.org>2007-01-18 08:14:36 +0000
commitf1e00165dd741c383bca69c448898bab4a7ce814 (patch)
tree7286acf90c748609ca4744ca394f9ac789b96ae8 /python/tests
parentd81e5cad26f060b64501448d97ae5b6c821dce08 (diff)
downloadqpid-python-f1e00165dd741c383bca69c448898bab4a7ce814.tar.gz
Modified handling of reason for closing in peer to work around race between worker and reader where a connection.close is followed by the socket closing (this is a bit of a hack).
Modified test for queue_purge to do cleanup on new connection. Separated testing of scenario where closed channel is used from that where an unopened channel is used. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@497342 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/broker.py4
-rw-r--r--python/tests/queue.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/python/tests/broker.py b/python/tests/broker.py
index f3888589a5..d9ac69c5e3 100644
--- a/python/tests/broker.py
+++ b/python/tests/broker.py
@@ -85,14 +85,14 @@ class BrokerTests(TestBase):
self.assert_(msg.content.body == body)
def test_invalid_channel(self):
- other = self.connect()
- channel = other.channel(200)
+ channel = self.client.channel(200)
try:
channel.queue_declare(exclusive=True)
self.fail("Expected error on queue_declare for invalid channel")
except Closed, e:
self.assertConnectionException(504, e.args[0])
+ def test_closed_channel(self):
channel = self.client.channel(200)
channel.channel_open()
channel.channel_close()
diff --git a/python/tests/queue.py b/python/tests/queue.py
index d5c13fa87a..9e32c44fd5 100644
--- a/python/tests/queue.py
+++ b/python/tests/queue.py
@@ -74,7 +74,8 @@ class QueueTests(TestBase):
self.assertConnectionException(530, e.args[0])
#cleanup
- channel = self.client.channel(4)
+ other = self.connect()
+ channel = other.channel(1)
channel.channel_open()
channel.exchange_delete(exchange="test-exchange")