[Zodb-checkins] CVS: Zope3/src/zodb/storage/tests - undo.py:1.6

Barry Warsaw barry@wooz.org
Fri, 28 Feb 2003 11:16:59 -0500


Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv29084

Modified Files:
	undo.py 
Log Message:
checkTransactionalUndoAfterPack(): Clean up two timing assumptions in
the test, which aren't necessarily guaranteed on Windows.  The
packtime must be greater than revid1's timestamp, and revid2's
timestamp must be greater than the packtime.  On Windows it's possible
one or both of those revids were equal to the packtime due to Windows
clock granularity.

This should fix the problem; Tim will verify.


=== Zope3/src/zodb/storage/tests/undo.py 1.5 => 1.6 ===
--- Zope3/src/zodb/storage/tests/undo.py:1.5	Wed Feb  5 18:28:27 2003
+++ Zope3/src/zodb/storage/tests/undo.py	Fri Feb 28 11:16:57 2003
@@ -460,6 +460,10 @@
         now = packtime = time.time()
         while packtime <= now:
             packtime = time.time()
+            time.sleep(0.1)
+        # Now be sure that revid2 has a timestamp after packtime
+        while packtime >= time.time():
+            time.sleep(0.1)
         revid2 = self._dostore(oid, revid=revid1, data=MinPO(52))
         revid3 = self._dostore(oid, revid=revid2, data=MinPO(53))
         # Now get the undo log