summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-05-03 19:10:23 +0000
committerAlan Conway <aconway@apache.org>2010-05-03 19:10:23 +0000
commitaf5e6564dc3635848bb406cc210e3c81f6514359 (patch)
tree5e456cfcc75840c57e12b4d3d3ae785cf444c8ab
parentf45b4c20319f79749ece2890f4e31974d2b36536 (diff)
downloadqpid-python-af5e6564dc3635848bb406cc210e3c81f6514359.tar.gz
Fix race condition in store+cluster tests.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@940573 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/python/qpid/brokertest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/qpid/python/qpid/brokertest.py b/qpid/python/qpid/brokertest.py
index 47168f6582..e05a172ab4 100644
--- a/qpid/python/qpid/brokertest.py
+++ b/qpid/python/qpid/brokertest.py
@@ -388,6 +388,7 @@ class Broker(Popen):
def store_state(self):
uuids = open(os.path.join(self.datadir, "cluster", "store.status")).readlines()
null_uuid="00000000-0000-0000-0000-000000000000\n"
+ if len(uuids) < 2: return "unknown" # we looked while the file was being updated.
if uuids[0] == null_uuid: return "empty"
if uuids[1] == null_uuid: return "dirty"
return "clean"