[Zodb-checkins] CVS: ZODB3/ZODB/tests - RecoveryStorage.py:1.8

Tim Peters tim.one at comcast.net
Fri May 30 17:05:47 EDT 2003


Update of /cvs-repository/ZODB3/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv31882/ZODB/tests

Modified Files:
	RecoveryStorage.py 
Log Message:
checkRestoreAcrossPack():  A live storage iterator keeps the file open,
which makes it impossible for teardown to delete the file on Windows,
which causes this test to fail, and also "the next" test to fail because
its setup can't delete Source.fs either.  So explictly close the storage
iterator.


=== ZODB3/ZODB/tests/RecoveryStorage.py 1.7 => 1.8 ===
--- ZODB3/ZODB/tests/RecoveryStorage.py:1.7	Fri Dec 13 14:38:21 2002
+++ ZODB3/ZODB/tests/RecoveryStorage.py	Fri May 30 16:05:46 2003
@@ -145,10 +145,12 @@
 
         # copy the final transaction manually.  even though there
         # was a pack, the restore() ought to succeed.
-        final = list(self._storage.iterator())[-1]
+        it = self._storage.iterator()
+        final = list(it)[-1]
         self._dst.tpc_begin(final, final.tid, final.status)
         for r in final:
             self._dst.restore(r.oid, r.serial, r.data, r.version, r.data_txn,
                               final)
+        it.close()
         self._dst.tpc_vote(final)
         self._dst.tpc_finish(final)




More information about the Zodb-checkins mailing list