[Zodb-checkins] SVN: ZODB/branches/gocept-iteration/src/ZEO/tests/IterationTests.py snapshot

Thomas Lotze tl at gocept.com
Thu Feb 14 08:09:41 EST 2008


Log message for revision 83826:
  snapshot

Changed:
  U   ZODB/branches/gocept-iteration/src/ZEO/tests/IterationTests.py

-=-
Modified: ZODB/branches/gocept-iteration/src/ZEO/tests/IterationTests.py
===================================================================
--- ZODB/branches/gocept-iteration/src/ZEO/tests/IterationTests.py	2008-02-14 12:50:47 UTC (rev 83825)
+++ ZODB/branches/gocept-iteration/src/ZEO/tests/IterationTests.py	2008-02-14 13:09:36 UTC (rev 83826)
@@ -14,7 +14,6 @@
 """ZEO iterator protocol tests."""
 
 import transaction
-from ZODB.tests.StorageTestBase import zodb_pickle, MinPO
 
 
 class IterationTests:
@@ -72,3 +71,17 @@
         self._storage.tpc_abort(t)
         self.assertEquals(0, len(self._storage._iterator_ids))
         self.assertRaises(KeyError, self._storage._server.iterator_next, iid)
+
+    def checkIteratorParallel(self):
+        self._dostore()
+        self._dostore()
+        iter1 = self._storage.iterator()
+        iter2 = self._storage.iterator()
+        txn_info1 = iter1.next()
+        txn_info2 = iter2.next()
+        self.assertEquals(txn_info1.tid, txn_info2.tid)
+        txn_info1 = iter1.next()
+        txn_info2 = iter2.next()
+        self.assertEquals(txn_info1.tid, txn_info2.tid)
+        self.assertRaises(StopIteration, iter1.next)
+        self.assertRaises(StopIteration, iter2.next)



More information about the Zodb-checkins mailing list