summaryrefslogtreecommitdiff
path: root/test/engine/test_pool.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-03-06 08:18:26 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-03-06 09:09:38 -0500
commitcb968b6dcd4dd8ce805827202ca55a7ce10fc871 (patch)
treefebefc3f6e39ec498ca47e62198a1be2a89dd898 /test/engine/test_pool.py
parent201c4a60e4b8af56d9c02a3675d1443ba4171c89 (diff)
downloadsqlalchemy-cb968b6dcd4dd8ce805827202ca55a7ce10fc871.tar.gz
Loosen SingletonThreadPoolTest
This test is non-critical as the SingletonThreadPool is not production-level robust under multithreaded scenarios in any case. Fixes: #4527 Change-Id: Ie19ebd69438c97b2d8adb571f8f1b2c56894f7fb
Diffstat (limited to 'test/engine/test_pool.py')
-rw-r--r--test/engine/test_pool.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py
index 1aadd477d..3722ce9b9 100644
--- a/test/engine/test_pool.py
+++ b/test/engine/test_pool.py
@@ -15,6 +15,7 @@ from sqlalchemy.testing import eq_
from sqlalchemy.testing import fixtures
from sqlalchemy.testing import is_
from sqlalchemy.testing import is_not_
+from sqlalchemy.testing import is_true
from sqlalchemy.testing.engines import testing_engine
from sqlalchemy.testing.mock import ANY
from sqlalchemy.testing.mock import call
@@ -1809,7 +1810,9 @@ class SingletonThreadPoolTest(PoolTestBase):
threads.append(th)
for th in threads:
th.join(join_timeout)
- eq_(len(p._all_conns), 3)
+
+ lp = len(p._all_conns)
+ is_true(3 <= lp <= 4)
if strong_refs:
still_opened = len([c for c in sr if not c.close.call_count])