summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-04-01 17:51:04 +0000
committerAlan Conway <aconway@apache.org>2010-04-01 17:51:04 +0000
commit01fac737f94afef33eee5eaa35df7833920c6ef2 (patch)
treedba3fcad81f4d1c2b4e8ea5ea53f119c26e03617 /qpid/python
parentb16d99f1de42e7e02cb0c09d83201a9c87275c83 (diff)
downloadqpid-python-01fac737f94afef33eee5eaa35df7833920c6ef2.tar.gz
Update cluster store status with a single atomic write() operation.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@930055 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/brokertest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/python/qpid/brokertest.py b/qpid/python/qpid/brokertest.py
index 2f064f59b6..3608a959b1 100644
--- a/qpid/python/qpid/brokertest.py
+++ b/qpid/python/qpid/brokertest.py
@@ -373,6 +373,13 @@ class Broker(Popen):
try: self.connect().close()
except: raise RethrownException("Broker %s failed ready test"%self.name)
+ def store_state(self):
+ uuids = open(os.path.join(self.datadir, "cluster", "store.status")).readlines()
+ null_uuid="00000000-0000-0000-0000-000000000000\n"
+ if uuids[0] == null_uuid: return "empty"
+ if uuids[1] == null_uuid: return "dirty"
+ return "clean"
+
class Cluster:
"""A cluster of brokers in a test."""