From 01fac737f94afef33eee5eaa35df7833920c6ef2 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 1 Apr 2010 17:51:04 +0000 Subject: 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 --- qpid/python/qpid/brokertest.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qpid/python') 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.""" -- cgit v1.2.1