summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/suite/test_results.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2021-11-07 21:19:45 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2021-11-07 21:19:45 +0000
commit201c00bc0837af831f115e8313ad3ccb0be97e7a (patch)
treebeb7558e95d073b63fa4bb76d830ccaa2de9711a /lib/sqlalchemy/testing/suite/test_results.py
parent5b1c9053b0903b2d5a06f82b47fe16a870696ddc (diff)
parentd050193daaa8d91371c759296f3304b8641c1976 (diff)
downloadsqlalchemy-201c00bc0837af831f115e8313ad3ccb0be97e7a.tar.gz
Merge "fully implement future engine and remove legacy" into main
Diffstat (limited to 'lib/sqlalchemy/testing/suite/test_results.py')
-rw-r--r--lib/sqlalchemy/testing/suite/test_results.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_results.py b/lib/sqlalchemy/testing/suite/test_results.py
index c41a55025..f470432d2 100644
--- a/lib/sqlalchemy/testing/suite/test_results.py
+++ b/lib/sqlalchemy/testing/suite/test_results.py
@@ -323,6 +323,20 @@ class ServerSideCursorsTest(
).exec_driver_sql("select 1")
assert self._is_server_side(result.cursor)
+ # the connection has autobegun, which means at the end of the
+ # block, we will roll back, which on MySQL at least will fail
+ # with "Commands out of sync" if the result set
+ # is not closed, so we close it first.
+ #
+ # fun fact! why did we not have this result.close() in this test
+ # before 2.0? don't we roll back in the connection pool
+ # unconditionally? yes! and in fact if you run this test in 1.4
+ # with stdout shown, there is in fact "Exception during reset or
+ # similar" with "Commands out sync" emitted a warning! 2.0's
+ # architecture finds and fixes what was previously an expensive
+ # silent error condition.
+ result.close()
+
def test_stmt_enabled_conn_option_disabled(self):
engine = self._fixture(False)