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 2010/05/03 21:10:23 UTC

svn commit: r940573 - /qpid/trunk/qpid/python/qpid/brokertest.py

Author: aconway
Date: Mon May  3 19:10:23 2010
New Revision: 940573

URL: http://svn.apache.org/viewvc?rev=940573&view=rev
Log:
Fix race condition in store+cluster tests.

Modified:
    qpid/trunk/qpid/python/qpid/brokertest.py

Modified: qpid/trunk/qpid/python/qpid/brokertest.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/brokertest.py?rev=940573&r1=940572&r2=940573&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/brokertest.py (original)
+++ qpid/trunk/qpid/python/qpid/brokertest.py Mon May  3 19:10:23 2010
@@ -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"



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org