Commit 95d22271 authored by Tim Peters's avatar Tim Peters

Added XXX comments about stray output produced by

testExceptionInTpcAbort().  The cause is clear now, but a solution isn't;
an exception in tpc_abort is nasty.
parent e18d876c
...@@ -36,7 +36,7 @@ TODO ...@@ -36,7 +36,7 @@ TODO
add in tests for objects which are modified multiple times, add in tests for objects which are modified multiple times,
for example an object that gets modified in multiple sub txns. for example an object that gets modified in multiple sub txns.
$Id: testTransaction.py,v 1.21 2004/04/02 19:31:32 tim_one Exp $ $Id: testTransaction.py,v 1.22 2004/04/02 19:48:22 tim_one Exp $
""" """
import unittest import unittest
...@@ -385,6 +385,9 @@ class TransactionTests(unittest.TestCase): ...@@ -385,6 +385,9 @@ class TransactionTests(unittest.TestCase):
self.sub1.modify(nojar=1) self.sub1.modify(nojar=1)
try: try:
# XXX Transaction._cleanup() prints a stray "error tpc_abort"
# XXX (the string value of the TestTxnException instance raised)
# XXX to stdout.
get_transaction().commit() get_transaction().commit()
except TestTxnException: except TestTxnException:
pass pass
......
...@@ -324,11 +324,13 @@ class Transaction(object): ...@@ -324,11 +324,13 @@ class Transaction(object):
try: try:
rm.abort_sub(self) rm.abort_sub(self)
except Exception, err: except Exception, err:
# XXX Just printing the error doesn't seem good enough.
print err print err
else: else:
try: try:
rm.tpc_abort(self) rm.tpc_abort(self)
except Exception, err: except Exception, err:
# XXX Just printing the error doesn't seem good enough.
print err print err
def _getResourceManagers(self, subtransaction): def _getResourceManagers(self, subtransaction):
......
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