[Zope3-checkins] CVS: ZODB/src/ZODB - fsrecover.py:1.22

Tim Peters tim.one at comcast.net
Mon May 3 14:45:05 EDT 2004


Update of /cvs-repository/ZODB/src/ZODB
In directory cvs.zope.org:/tmp/cvs-serv9111/src/ZODB

Modified Files:
	fsrecover.py 
Log Message:
Collector #1307:  fsrecover.py broken on HEAD.

fsrecover.py:  the call to restore() was still using .serial, which no
longer exists.  Changed to use .tid.

testRecover.py:  the tests here passed despite that fsrecover wasn't
working at all.  Changed RecoverTest.recover() to eliminate its unused
arguments, and to return all the output fsrecover.recover() produces (the
output was being thrown away, unlooked at).  Added new testNoDamage(),
which feeds recovery a healthy .fs, and then looks at the output of
recovery, to verify that no errors were reported and no bytes were
removed by recovery.  Changed all the other tests to stop passing unused
arguments to RecoverTest.recover(), and to verify that error output was
produced by recovery.

XXX I'm not sure that every call to RecoverTest.recover() will actually
XXX produce an error in fsrecover.recover(), so we may get some spurious
XXX test failures here.  I'll keep my open for those.  (The kinds of
XXX damage tested are randomized, so one run doesn't prove anything.)


=== ZODB/src/ZODB/fsrecover.py 1.21 => 1.22 ===
--- ZODB/src/ZODB/fsrecover.py:1.21	Mon May  3 14:14:15 2004
+++ ZODB/src/ZODB/fsrecover.py	Mon May  3 14:44:31 2004
@@ -335,7 +335,7 @@
                         l = len(r.data)
 
                     print "%7d %s %s" % (u64(r.oid), l, r.version)
-                ofs.restore(r.oid, r.serial, r.data, r.version, r.data_txn,
+                ofs.restore(r.oid, r.tid, r.data, r.version, r.data_txn,
                             txn)
                 nrec += 1
         except (KeyboardInterrupt, SystemExit):




More information about the Zope3-Checkins mailing list