summaryrefslogtreecommitdiff
path: root/test/lib/engines.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-05-09 20:40:33 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2011-05-09 20:40:33 -0400
commit4d99799ee724070fe0fe7404f655854d223f6e93 (patch)
tree405b22806990ec681408952f1aba7f17ffb4f73c /test/lib/engines.py
parent445afb56c14c71db90ace859a37404642226e49c (diff)
downloadsqlalchemy-4d99799ee724070fe0fe7404f655854d223f6e93.tar.gz
- given that Oracle's issue is not just open connections, but *closed* ones too, go really
heavy handed and start marking tests as "requires.ad_hoc_engines", add a flag --low-connections that will switch the engine reaper mechanism to use as *few* distinct engines and connections as possible, many engine tests that really need their own engines are just skipped.
Diffstat (limited to 'test/lib/engines.py')
-rw-r--r--test/lib/engines.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lib/engines.py b/test/lib/engines.py
index 6202c0a3d..7b830e643 100644
--- a/test/lib/engines.py
+++ b/test/lib/engines.py
@@ -51,6 +51,19 @@ class ConnectionKiller(object):
# self._safe(conn.rollback)
def _stop_test_ctx(self):
+ if config.options.low_connections:
+ self._stop_test_ctx_minimal()
+ else:
+ self._stop_test_ctx_aggressive()
+
+ def _stop_test_ctx_minimal(self):
+ from test.lib import testing
+ self.close_all()
+ for rec in self.testing_engines.keys():
+ if rec is not testing.db:
+ rec.dispose()
+
+ def _stop_test_ctx_aggressive(self):
self.close_all()
for conn in self.conns:
self._safe(conn.close)