summaryrefslogtreecommitdiff
path: root/test/engine/test_pool.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-07-13 16:36:54 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-07-13 16:37:10 -0400
commitc896c75971da8221538128e14011cfa156471c74 (patch)
tree4289bad8cd3908adb43327832c3503cc75877b47 /test/engine/test_pool.py
parent040680a19cf29844356236c34e2d4ccdce601497 (diff)
downloadsqlalchemy-c896c75971da8221538128e14011cfa156471c74.tar.gz
fix the scoping here
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r--test/engine/test_pool.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py
index 3e0188bd7..d504473b4 100644
--- a/test/engine/test_pool.py
+++ b/test/engine/test_pool.py
@@ -887,7 +887,7 @@ class QueuePoolTest(PoolTestBase):
p = pool.QueuePool(creator=creator,
pool_size=2, timeout=timeout,
max_overflow=max_overflow)
- def waiter(p):
+ def waiter(p, timeout, max_overflow):
success_key = (timeout, max_overflow)
conn = p.connect()
time.sleep(.5)
@@ -899,7 +899,8 @@ class QueuePoolTest(PoolTestBase):
c2 = p.connect()
for i in range(2):
- t = threading.Thread(target=waiter, args=(p, ))
+ t = threading.Thread(target=waiter,
+ args=(p, timeout, max_overflow))
t.setDaemon(True) # so the tests dont hang if this fails
t.start()
@@ -907,6 +908,7 @@ class QueuePoolTest(PoolTestBase):
c2.invalidate()
p2 = p._replace()
time.sleep(1)
+
eq_(len(success), 12, "successes: %s" % success)
@testing.requires.threading_with_mock