[Zodb-checkins] CVS: ZODB4/ZODB/tests - RecoveryStorage.py:1.5
Barry Warsaw
barry@wooz.org
Mon, 16 Dec 2002 16:19:25 -0500
Update of /cvs-repository/ZODB4/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv8968
Modified Files:
RecoveryStorage.py
Log Message:
Forward ported from zodb3 -- use self.new_dest() to get the
destination storage instead of hardcoding FileStorage.
Other cleanups.
=== ZODB4/ZODB/tests/RecoveryStorage.py 1.4 => 1.5 ===
--- ZODB4/ZODB/tests/RecoveryStorage.py:1.4 Fri Dec 6 18:09:29 2002
+++ ZODB4/ZODB/tests/RecoveryStorage.py Mon Dec 16 16:19:24 2002
@@ -18,8 +18,7 @@
from ZODB.ZTransaction import Transaction
from ZODB.tests.IteratorStorage import IteratorDeepCompare
-from ZODB.tests.StorageTestBase import MinPO, zodb_unpickle, removefs
-from ZODB.FileStorage import FileStorage
+from ZODB.tests.StorageTestBase import MinPO, zodb_unpickle
from ZODB.DB import DB
from Transaction import get_transaction
@@ -129,8 +128,8 @@
# Now remove _dst and copy all the transactions a second time.
# This time we will be able to confirm via compare().
self._dst.close()
- removefs("Dest.fs")
- self._dst = FileStorage('Dest.fs')
+ self._dst.cleanup()
+ self._dst = self.new_dest()
self._dst.copyTransactionsFrom(self._storage)
self.compare(self._storage, self._dst)
@@ -138,9 +137,9 @@
db = DB(self._storage)
c = db.open()
r = c.root()
- obj1 = r["obj1"] = MinPO(1)
+ obj = r["obj1"] = MinPO(1)
get_transaction().commit()
- obj1 = r["obj2"] = MinPO(1)
+ obj = r["obj2"] = MinPO(1)
get_transaction().commit()
self._dst.copyTransactionsFrom(self._storage)
@@ -154,6 +153,6 @@
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)
+ final)
self._dst.tpc_vote(final)
self._dst.tpc_finish(final)