Commit 05f503f2 authored by Christian Theune's avatar Christian Theune

More clarification on the checkIteratorGCSpanTransactions test. Also use the

generic dostore() method instead of writing a transaction manually.
parent 0cbafaa6
...@@ -48,11 +48,11 @@ class IterationTests: ...@@ -48,11 +48,11 @@ class IterationTests:
# Keep a hard reference to the iterator so it won't be automatically # Keep a hard reference to the iterator so it won't be automatically
# garbage collected at the transaction boundary. # garbage collected at the transaction boundary.
iterator = self._storage.iterator() iterator = self._storage.iterator()
t = transaction.Transaction() self._dostore()
self._storage.tpc_begin(t) # As the iterator was not garbage collected, we can still use it. (We
self._storage.tpc_vote(t) # don't see the transaction we just wrote being picked up, because
self._storage.tpc_finish(t) # iterators only see the state from the point in time when they were
# As the iterator was not garbage collected, we can still use it. # created.)
self.assertEquals([], list(iterator)) self.assertEquals([], list(iterator))
def checkIteratorGCStorageCommitting(self): def checkIteratorGCStorageCommitting(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment