[Zope-Checkins] CVS: StandaloneZODB/ZODB/tests - TransactionalUndoStorage.py:1.16

Jeremy Hylton jeremy@zope.com
Thu, 28 Mar 2002 19:20:25 -0500


Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv3744

Modified Files:
	TransactionalUndoStorage.py 
Log Message:
Don't pass a revid to pack().  Pass the current time.

Two problems: A revid doesn't have the right type.  But even if we
decoded the revid using TimeStamp(revid).timeTime(), it would be the
wrong time.  We want to pack to the current time to delete older
revisions.

I believe the test case tried to keep one revision available so that
it could be packed.  The new test doesn't do that, so it will fail
even after we fix FileStorage.  I think the right answer is to call
time.time() after the second commit *and* make sure that there is at
least a one second delay between the two stores.


=== StandaloneZODB/ZODB/tests/TransactionalUndoStorage.py 1.15 => 1.16 ===
         # second revision otherwise we won't be able to undo the third
         # revision!
-        self._storage.pack(revid1, referencesf)
+        self._storage.pack(time.time(), referencesf)
         # And now attempt to undo the last transaction
         t = Transaction()
         self._storage.tpc_begin(t)