diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-07-13 16:36:54 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-07-13 16:37:10 -0400 |
commit | c896c75971da8221538128e14011cfa156471c74 (patch) | |
tree | 4289bad8cd3908adb43327832c3503cc75877b47 | |
parent | 040680a19cf29844356236c34e2d4ccdce601497 (diff) | |
download | sqlalchemy-c896c75971da8221538128e14011cfa156471c74.tar.gz |
fix the scoping here
-rw-r--r-- | test/engine/test_pool.py | 6 |
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 |