[Zope-Checkins] CVS: Zope3/src/ZEO/tests - InvalidationTests.py:1.12
Jeremy Hylton
jeremy at zope.com
Thu Apr 15 12:31:00 EDT 2004
Update of /cvs-repository/Zope3/src/ZEO/tests
In directory cvs.zope.org:/tmp/cvs-serv11824
Modified Files:
InvalidationTests.py
Log Message:
Call transaction manager directly rather than using getTransaction().
=== Zope3/src/ZEO/tests/InvalidationTests.py 1.11 => 1.12 ===
--- Zope3/src/ZEO/tests/InvalidationTests.py:1.11 Wed Mar 31 22:56:59 2004
+++ Zope3/src/ZEO/tests/InvalidationTests.py Thu Apr 15 12:31:00 2004
@@ -72,7 +72,8 @@
self.step = step
self.sleep = sleep
self.added_keys = []
- self.cn = self.db.open(txn_mgr=transaction.TransactionManager())
+ self.tm = transaction.TransactionManager()
+ self.cn = self.db.open(txn_mgr=self.tm)
self.cn.sync()
def doStep(self):
@@ -83,11 +84,11 @@
def commit(self):
cn = self.cn
key = self.startnum
- cn.getTransaction().note("add key %s" % key)
+ self.tm.get().note("add key %s" % key)
try:
- cn.getTransaction().commit()
+ self.tm.get().commit()
except ConflictError, msg:
- cn.getTransaction().abort()
+ self.tm.get().abort()
cn.sync()
else:
if self.sleep:
@@ -96,7 +97,7 @@
self.startnum += self.step
def cleanup(self):
- self.cn.getTransaction().abort()
+ self.tm.get().abort()
self.cn.close()
def _runTasks(rounds, *tasks):
More information about the Zope-Checkins
mailing list