[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/IterationTests.py More clarification on the checkIteratorGCSpanTransactions test. Also use the

Christian Theune ct at gocept.com
Sat Nov 21 02:25:56 EST 2009


Log message for revision 105935:
  More clarification on the checkIteratorGCSpanTransactions test. Also use the
  generic dostore() method instead of writing a transaction manually.
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/IterationTests.py

-=-
Modified: ZODB/trunk/src/ZEO/tests/IterationTests.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/IterationTests.py	2009-11-21 07:25:52 UTC (rev 105934)
+++ ZODB/trunk/src/ZEO/tests/IterationTests.py	2009-11-21 07:25:55 UTC (rev 105935)
@@ -48,11 +48,11 @@
         # Keep a hard reference to the iterator so it won't be automatically
         # garbage collected at the transaction boundary.
         iterator = self._storage.iterator()
-        t = transaction.Transaction()
-        self._storage.tpc_begin(t)
-        self._storage.tpc_vote(t)
-        self._storage.tpc_finish(t)
-        # As the iterator was not garbage collected, we can still use it.
+        self._dostore()
+        # As the iterator was not garbage collected, we can still use it. (We
+        # don't see the transaction we just wrote being picked up, because
+        # iterators only see the state from the point in time when they were
+        # created.)
         self.assertEquals([], list(iterator))
 
     def checkIteratorGCStorageCommitting(self):



More information about the Zodb-checkins mailing list