From cb968b6dcd4dd8ce805827202ca55a7ce10fc871 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 6 Mar 2019 08:18:26 -0500 Subject: [PATCH] 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 --- test/engine/test_pool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/engine/test_pool.py b/test/engine/test_pool.py index 1aadd477d9..3722ce9b9f 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]) -- 2.47.3