From c19ebfc3dc3f9a707920ee7f3b533d4919eeefb1 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 21 Dec 2016 10:20:19 -0500 Subject: [PATCH] Use session for exec check This was using a different connection which could deadlock on SQL Server. Change-Id: Ia7953f362c99d9247dd47c3f5c3b0b91c96db1a5 --- test/orm/test_unitofworkv2.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/orm/test_unitofworkv2.py b/test/orm/test_unitofworkv2.py index b2fefe6167..651a9b9ab3 100644 --- a/test/orm/test_unitofworkv2.py +++ b/test/orm/test_unitofworkv2.py @@ -1307,9 +1307,13 @@ class RowswitchAccountingTest(fixtures.MappedTest): sess.flush() eq_( - select([func.count('*')]).select_from(self.tables.parent).scalar(), - 0) + sess.scalar( + select([func.count('*')]).select_from(self.tables.parent) + ), + 0 + ) + sess.close() class RowswitchM2OTest(fixtures.MappedTest): # tests for #3060 and related issues -- 2.47.2