From: Mike Bayer Date: Thu, 2 Jun 2016 16:46:45 +0000 (-0400) Subject: - don't raise for stray gc connection. this just happens X-Git-Tag: rel_1_1_0b1~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a4aa46ae49f3ddcdadd4f3f10ef9cbce1fbf9aa;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - don't raise for stray gc connection. this just happens sometimes and it really breaks the build once this error occurs. Change-Id: I577c78d623b22a6429f8b083fe08821bc467eb7a --- diff --git a/lib/sqlalchemy/testing/assertions.py b/lib/sqlalchemy/testing/assertions.py index ea50c07386..bd1ccaa519 100644 --- a/lib/sqlalchemy/testing/assertions.py +++ b/lib/sqlalchemy/testing/assertions.py @@ -197,8 +197,9 @@ def _assert_no_stray_pool_connections(): # so the error doesn't at least keep happening. pool._refs.clear() _STRAY_CONNECTION_FAILURES = 0 - assert False, "Stray connection refused to leave "\ - "after gc.collect(): %s" % err + warnings.warn( + "Stray connection refused to leave " + "after gc.collect(): %s" % err) elif _STRAY_CONNECTION_FAILURES > 10: assert False, "Encountered more than 10 stray connections" _STRAY_CONNECTION_FAILURES = 0