[Checkins] SVN: ZODB/trunk/src/ZODB/tests/MTStorage.py Be a little more informative when the vicious concurrency tests fail

Shane Hathaway shane at hathawaymix.org
Sun May 17 07:44:09 EDT 2009


Log message for revision 100021:
  Be a little more informative when the vicious concurrency tests fail
  

Changed:
  U   ZODB/trunk/src/ZODB/tests/MTStorage.py

-=-
Modified: ZODB/trunk/src/ZODB/tests/MTStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/tests/MTStorage.py	2009-05-16 20:40:12 UTC (rev 100020)
+++ ZODB/trunk/src/ZODB/tests/MTStorage.py	2009-05-17 11:44:08 UTC (rev 100021)
@@ -96,13 +96,17 @@
                 break
             except ConflictError:
                 root._p_jar.sync()
+        else:
+            raise ConflictError("Exceeded %d attempts to store" % MAXRETRIES)
 
-        for i in range(MAXRETRIES):
+        for j in range(MAXRETRIES):
             try:
                 return root.get(name)
             except ConflictError:
                 root._p_jar.sync()
 
+        raise ConflictError("Exceeded %d attempts to read" % MAXRETRIES)
+
 class StorageClientThread(TestThread):
 
     __super_init = TestThread.__init__



More information about the Checkins mailing list