SVN: ZODB/trunk/src/ZEO/tests/IterationTests.py More clarification on the checkIteratorGCSpanTransactions test. Also use the

Christian Theune <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <20091121072556.2DA5994184__6165.66889589212$1258788368$gmane$org@cvs.zope.org>
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):
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.