Commit fe799ecc authored by Guido van Rossum's avatar Guido van Rossum

Make sure that a transaction that is successfully begun is always

aborted.
parent eaa9c142
......@@ -108,19 +108,26 @@ class SynchronizedStorage:
self._storage.tpc_abort(Transaction())
def checkAbortWrongTrans(self):
self._storage.tpc_begin(Transaction())
t = Transaction()
self._storage.tpc_begin(t)
self._storage.tpc_abort(Transaction())
self._storage.tpc_abort(t)
def checkFinishNotCommitting(self):
self._storage.tpc_finish(Transaction())
t = Transaction()
self._storage.tpc_finish(t)
self._storage.tpc_abort(t)
def checkFinishWrongTrans(self):
self._storage.tpc_begin(Transaction())
t = Transaction()
self._storage.tpc_begin(t)
self._storage.tpc_finish(Transaction())
self._storage.tpc_abort(t)
def checkBeginCommitting(self):
t = Transaction()
self._storage.tpc_begin(t)
self._storage.tpc_begin(t)
self._storage.tpc_abort(t)
# XXX how to check undo?
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