[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cvs
Subject:    [Zope-Checkins] CVS: ZODB3/ZODB/tests - RecoveryStorage.py:1.8
From:       Tim Peters <tim.one () comcast ! net>
Date:       2003-05-30 20:05:47
[Download RAW message or body]

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)


_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic