summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-07-05 20:12:08 +0000
committerAlan Conway <aconway@apache.org>2010-07-05 20:12:08 +0000
commit1c0490365610ba8db496847589049c83ddbc36e1 (patch)
treee41c5b53b7060014fbc7dd472cf9b75385264d43 /qpid/python
parent8db7ae7ca30bdf2f71598d5a52b5711705a1a011 (diff)
downloadqpid-python-1c0490365610ba8db496847589049c83ddbc36e1.tar.gz
Defer delivery of messages in cluster-unsafe context.
Messages enqueued in a cluster-safe context are synchronized across the cluster. However some messages are delivered in a cluster-unsafe context, for example raising a link established event occurs the connection thread of the establishing connection. This fix deferrs such messages by multicasting them so they can be re-delived in a cluster safe context. See https://bugzilla.redhat.com/show_bug.cgi?id=611543 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@960681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/brokertest.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/qpid/python/qpid/brokertest.py b/qpid/python/qpid/brokertest.py
index 011254d21d..5473bd588e 100644
--- a/qpid/python/qpid/brokertest.py
+++ b/qpid/python/qpid/brokertest.py
@@ -251,6 +251,12 @@ def checkenv(name):
if not value: raise Exception("Environment variable %s is not set" % name)
return value
+def find_in_file(str, filename):
+ if not os.path.exists(filename): return False
+ f = open(filename)
+ try: return str in f.read()
+ finally: f.close()
+
class Broker(Popen):
"A broker process. Takes care of start, stop and logging."
_broker_count = 0
@@ -367,15 +373,7 @@ class Broker(Popen):
def log_ready(self):
"""Return true if the log file exists and contains a broker ready message"""
if self._log_ready: return True
- if not os.path.exists(self.log): return False
- f = open(self.log)
- try:
- for l in f:
- if "notice Broker running" in l:
- self._log_ready = True
- return True
- return False
- finally: f.close()
+ self._log_ready = find_in_file("notice Broker running", self.log)
def ready(self, **kwargs):
"""Wait till broker is ready to serve clients"""