summaryrefslogtreecommitdiff
path: root/test/engine
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-01-13 03:22:11 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-01-13 03:22:11 -0500
commitbebf30e34d669a5ede54e512e55ee5186fe015f6 (patch)
treeaefbf3d58e23997376e0a0990d793a0501f914ff /test/engine
parent578df5b86b35db97c56e38161ab9dc917269a3b0 (diff)
downloadsqlalchemy-bebf30e34d669a5ede54e512e55ee5186fe015f6.tar.gz
- continue with [ticket:2907] and further clean up how we set up
_reset_agent, so that it's local to the various begin_impl(), rollback_impl(), etc. this allows setting/resetting of the flag to be symmetric. - don't set _reset_agent if it's not None, don't unset it if it isn't our own transaction. - make sure we clean it out in close(). - basically, we're dealing here with pools using "threadlocal" that have a counter, other various mismatches that the tests bring up - test for recover() now has to invalidate() the previous connection, because closing it actually rolls it back (e.g. this test was relying on the broken behavior).
Diffstat (limited to 'test/engine')
-rw-r--r--test/engine/test_transaction.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/engine/test_transaction.py b/test/engine/test_transaction.py
index e3f5fc252..c373133d1 100644
--- a/test/engine/test_transaction.py
+++ b/test/engine/test_transaction.py
@@ -342,7 +342,8 @@ class TransactionTest(fixtures.TestBase):
transaction = connection.begin_twophase()
connection.execute(users.insert(), user_id=1, user_name='user1')
transaction.prepare()
- connection.close()
+ connection.invalidate()
+
connection2 = testing.db.connect()
eq_(connection2.execute(select([users.c.user_id]).
order_by(users.c.user_id)).fetchall(),