diff options
author | Gordon Sim <gsim@apache.org> | 2011-03-01 16:16:40 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2011-03-01 16:16:40 +0000 |
commit | 9f5a99e4bc4725d9b5cb194db3e264e608258d6f (patch) | |
tree | 0e4b7b01a574ce5aa0836f19918060930fdf069a /python/qpid | |
parent | 8e9f2864339da4c4f09e4446a5371020a7a51697 (diff) | |
download | qpid-python-9f5a99e4bc4725d9b5cb194db3e264e608258d6f.tar.gz |
QPID-3063: test correct variable in check_close()
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1075876 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid')
-rw-r--r-- | python/qpid/messaging/endpoints.py | 2 | ||||
-rw-r--r-- | python/qpid/tests/messaging/endpoints.py | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/python/qpid/messaging/endpoints.py b/python/qpid/messaging/endpoints.py index b8101b76e6..30c5850397 100644 --- a/python/qpid/messaging/endpoints.py +++ b/python/qpid/messaging/endpoints.py @@ -197,7 +197,7 @@ class Connection(Endpoint): return result def check_closed(self): - if self.closed: + if not self._connected: self._condition.gc() raise ConnectionClosed() diff --git a/python/qpid/tests/messaging/endpoints.py b/python/qpid/tests/messaging/endpoints.py index c303ca652a..0977b2ab3a 100644 --- a/python/qpid/tests/messaging/endpoints.py +++ b/python/qpid/tests/messaging/endpoints.py @@ -186,6 +186,9 @@ class ConnectionTests(Base): def setup_connection(self): return Connection.establish(self.broker, **self.connection_options()) + def testCheckClosed(self): + assert not self.conn.check_closed() + def testSessionAnon(self): ssn1 = self.conn.session() ssn2 = self.conn.session() |