You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/11/08 21:18:58 UTC
svn commit: r1540171 - /qpid/trunk/qpid/cpp/src/tests/ha_test.py
Author: aconway
Date: Fri Nov 8 20:18:58 2013
New Revision: 1540171
URL: http://svn.apache.org/r1540171
Log:
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.
Modified:
qpid/trunk/qpid/cpp/src/tests/ha_test.py
Modified: qpid/trunk/qpid/cpp/src/tests/ha_test.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ha_test.py?rev=1540171&r1=1540170&r2=1540171&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ha_test.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/ha_test.py Fri Nov 8 20:18:58 2013
@@ -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):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org