[Zodb-checkins] CVS: Zope/lib/python/ZODB/tests -
PackableStorage.py:1.19
Tim Peters
tim.one at comcast.net
Fri May 30 15:35:56 EDT 2003
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()))
More information about the Zodb-checkins
mailing list