summaryrefslogtreecommitdiff
path: root/test/engine/test_pool.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-07-02 13:14:21 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-07-02 13:14:21 -0400
commitd3d10c982c8a44c85a0114c491207297eac7611d (patch)
treebdfda394fb23cc8d65c0acb77ca070937d93580a /test/engine/test_pool.py
parent38c5e870a7883df0ae104df828217e326f6cff6a (diff)
downloadsqlalchemy-d3d10c982c8a44c85a0114c491207297eac7611d.tar.gz
- refactor pool a bit so that intent between ConnectionRecord/ConnectionFairy is clear;
make sure that the DBAPI connection passed to the reset-on-return events/dialect hooks is also a "fairy", so that dictionaries like "info" are available. [ticket:2770] - rework the execution_options system so that the dialect is given the job of making any immediate adjustments based on a set event. move the "isolation level" logic to use this new system. Also work things out so that even engine-level execution options can be used for things like isolation level; the dialect attaches a connect-event handler in this case to handle the task. - to support this new system as well as further extensibiltiy of execution options add events engine_connect(), set_connection_execution_options(), set_engine_execution_options()
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r--test/engine/test_pool.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py
index 5b64a9f31..8c4bcd8b5 100644
--- a/test/engine/test_pool.py
+++ b/test/engine/test_pool.py
@@ -879,9 +879,10 @@ class QueuePoolTest(PoolTestBase):
pool_size=2, timeout=timeout,
max_overflow=max_overflow)
def waiter(p):
+ success_key = (timeout, max_overflow)
conn = p.connect()
time.sleep(.5)
- success.append(True)
+ success.append(success_key)
conn.close()
time.sleep(.2)
@@ -896,8 +897,8 @@ class QueuePoolTest(PoolTestBase):
c1.invalidate()
c2.invalidate()
p2 = p._replace()
- time.sleep(2)
- eq_(len(success), 12)
+ time.sleep(1)
+ eq_(len(success), 12, "successes: %s" % success)
@testing.requires.threading_with_mock
@testing.requires.python26