diff options
| author | Gordon Sim <gsim@apache.org> | 2007-02-09 13:44:08 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-02-09 13:44:08 +0000 |
| commit | 521b63e9ad416df5cd98c65aa0246efbc24b7503 (patch) | |
| tree | ce2cb3ca2ed6b49faa80dd0c2945db647d0bfb1b /python/qpid | |
| parent | 8cf4a0b8ebaa6075a1f083a294b1fee90bd4d196 (diff) | |
| download | qpid-python-521b63e9ad416df5cd98c65aa0246efbc24b7503.tar.gz | |
* qpid/peer.py - fix to prevent race between handling of connection.close request and socket close
* qpid/testlib.py - close client (if not closed) on tearDown
* tests/basic.py - revert back to using exclusive queue which should now be cleaned up on tear down
* tests/message.py - fix to prefetch tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@505287 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid')
| -rw-r--r-- | python/qpid/peer.py | 4 | ||||
| -rw-r--r-- | python/qpid/testlib.py | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/python/qpid/peer.py b/python/qpid/peer.py index 3c60d99f9a..9f9644f17d 100644 --- a/python/qpid/peer.py +++ b/python/qpid/peer.py @@ -89,7 +89,7 @@ class Peer: try: frame = self.conn.read() except EOF, e: - self.close(e) + self.work.close() break ch = self.channel(frame.channel) ch.receive(frame, self.work) @@ -126,6 +126,8 @@ class Peer: content = None self.delegate(channel, Message(channel, frame, content)) + except QueueClosed, e: + self.close(e) except: self.fatal() diff --git a/python/qpid/testlib.py b/python/qpid/testlib.py index 9f2f0d08d5..836315a4e3 100644 --- a/python/qpid/testlib.py +++ b/python/qpid/testlib.py @@ -171,6 +171,10 @@ class TestBase(unittest.TestCase): for ch, ex in self.exchanges: ch.exchange_delete(exchange=ex) + if not self.client.closed: + self.client.channel(0).connection_close(reply_code=200) + del self.client + def connect(self, *args, **keys): """Create a new connction, return the Client object""" return testrunner.connect(*args, **keys) |
