diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-09 17:38:59 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-08-09 17:38:59 -0400 |
| commit | 92ceb399c9d3bd2b6dd8bdcaac8c1108742684c7 (patch) | |
| tree | 3fdaf4221b97ca83d79d26c79d2208497ab9ec2f /test/aaa_profiling | |
| parent | 781fff75d05c3a809e29b98ad10bb3656aaae85a (diff) | |
| download | sqlalchemy-92ceb399c9d3bd2b6dd8bdcaac8c1108742684c7.tar.gz | |
- make sure event mechanics have completed before running this test, lower callcount
Diffstat (limited to 'test/aaa_profiling')
| -rw-r--r-- | test/aaa_profiling/test_pool.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/aaa_profiling/test_pool.py b/test/aaa_profiling/test_pool.py index b55156bf5..11c356c37 100644 --- a/test/aaa_profiling/test_pool.py +++ b/test/aaa_profiling/test_pool.py @@ -21,18 +21,22 @@ class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults): pool_module._refs.clear() def setup(self): + # create a throwaway pool which + # has the effect of initializing + # class-level event listeners on Pool, + # if not present already. + p1 = QueuePool(creator=self.Connection, + pool_size=3, max_overflow=-1, + use_threadlocal=True) + p1.connect() + global pool pool = QueuePool(creator=self.Connection, pool_size=3, max_overflow=-1, use_threadlocal=True) - # the callcount on this test seems to vary - # based on tests that ran before (particularly py3k), - # probably - # due to the event mechanics being established - # or not already... - @profiling.function_call_count(55, variance=.15) + @profiling.function_call_count(47, variance=.15) def test_first_connect(self): conn = pool.connect() |
