[Zope-Checkins] CVS: Zope/lib/python/ZODB/tests - PackableStorage.py:1.19
Tim Peters
tim.one@comcast.net
Fri, 30 May 2003 14:35:56 -0400
Update of /cvs-repository/Zope/lib/python/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv18057/lib/python/ZODB/tests
Modified Files:
PackableStorage.py
Log Message:
checkPackUndoLog(): Use snooze() twice to separate the pack time from the
transactions on both sides of it. The coarse granularity of time.time()
on Windows causes this test to fail sporadically otherwise.
=== Zope/lib/python/ZODB/tests/PackableStorage.py 1.18 => 1.19 ===
--- Zope/lib/python/ZODB/tests/PackableStorage.py:1.18 Fri May 30 05:24:44 2003
+++ Zope/lib/python/ZODB/tests/PackableStorage.py Fri May 30 14:35:56 2003
@@ -392,9 +392,9 @@
# Commit two different revisions
revid1 = self._dostoreNP(oid, data=pickle.dumps(obj))
obj.value = 2
- now = packtime = time.time()
- while packtime <= now:
- packtime = time.time()
+ snooze()
+ packtime = time.time()
+ snooze()
revid2 = self._dostoreNP(oid, revid=revid1, data=pickle.dumps(obj))
# Now pack the first transaction
self.assertEqual(3,len(self._storage.undoLog()))