diff options
author | Irina Delamare <irina.delamare@gmail.com> | 2019-01-23 19:23:59 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-24 12:45:06 -0500 |
commit | f9c9f6453a7ed4b9ad01f6d4d808f5cd273f8290 (patch) | |
tree | e003c05a28b8f1f109f676fb0f528aae591e99c0 /test/engine/test_pool.py | |
parent | bd735eba637cbf2c157046f72dc795a8b2b803e7 (diff) | |
download | sqlalchemy-f9c9f6453a7ed4b9ad01f6d4d808f5cd273f8290.tar.gz |
Provide public accessor for Pool.timeout().
Added public accessor :meth:`.Pool.timeout` that returns the configured
timeout for a :class:`.Pool` object. Pull request courtesy Irina Delamare.
Fixes: #3689
Closes: #4447
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4447
Pull-request-sha: 0179b0a829e9609429dc698992670d2e6749c10c
Change-Id: I402b065cf9183160f71d9de73e308268356b7deb
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r-- | test/engine/test_pool.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 75caa233a..672942482 100644 --- a/test/engine/test_pool.py +++ b/test/engine/test_pool.py @@ -1130,6 +1130,12 @@ class QueuePoolTest(PoolTestBase): lazy_gc() assert not pool._refs + def test_timeout_accessor(self): + expected_timeout = 123 + p = self._queuepool_fixture( + timeout=expected_timeout) + eq_(p.timeout(), expected_timeout) + @testing.requires.timing_intensive def test_timeout(self): p = self._queuepool_fixture(pool_size=3, max_overflow=0, timeout=2) |