diff options
| author | Alan Conway <aconway@apache.org> | 2013-11-08 20:18:58 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2013-11-08 20:18:58 +0000 |
| commit | 50a39102289bedb60cec1f97ad3583733a08646c (patch) | |
| tree | ac6aa02e6409d6c79fccfba7363b04f06165d8c1 /qpid/cpp | |
| parent | 520f7a07a51455b67be6852546cc9f006706a104 (diff) | |
| download | qpid-python-50a39102289bedb60cec1f97ad3583733a08646c.tar.gz | |
QPID-5318: HA tests fail sporadically with "AttributeError: 'NoneType' object has no attribute 'name'"
This was due to a race condition where a session was deleted while the QmfAgent
was looking it up.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1540171 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rwxr-xr-x | qpid/cpp/src/tests/ha_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/ha_test.py b/qpid/cpp/src/tests/ha_test.py index da28ff6712..8dd1347144 100755 --- a/qpid/cpp/src/tests/ha_test.py +++ b/qpid/cpp/src/tests/ha_test.py @@ -54,8 +54,9 @@ class QmfAgent(object): def repsub_queue(self, sub): """If QMF subscription sub is a replicating subscription return the name of the replicated queue, else return None""" - session_name = self.getSession(sub.sessionRef).name - m = re.search("qpid.ha-q:(.*)\.", session_name) + session = self.getSession(sub.sessionRef) + if not session: return None + m = re.search("qpid.ha-q:(.*)\.", session.name) return m and m.group(1) def repsub_queues(self): |
