This test is non-critical as the SingletonThreadPool is
not production-level robust under multithreaded scenarios in
any case.
Fixes: #4527
Change-Id: Ie19ebd69438c97b2d8adb571f8f1b2c56894f7fb
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
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])