summaryrefslogtreecommitdiff
path: root/reap_dbs.py
diff options
context:
space:
mode:
Diffstat (limited to 'reap_dbs.py')
-rw-r--r--reap_dbs.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/reap_dbs.py b/reap_dbs.py
new file mode 100644
index 000000000..10accde90
--- /dev/null
+++ b/reap_dbs.py
@@ -0,0 +1,22 @@
+"""Drop Oracle, SQL Server databases that are left over from a
+multiprocessing test run.
+
+Currently the cx_Oracle driver seems to sometimes not release a
+TCP connection even if close() is called, which prevents the provisioning
+system from dropping a database in-process.
+
+For SQL Server, databases still remain in use after tests run and
+running a kill of all detected sessions does not seem to release the
+database in process.
+
+"""
+from sqlalchemy.testing import provision
+import logging
+import sys
+
+logging.basicConfig()
+logging.getLogger(provision.__name__).setLevel(logging.INFO)
+
+provision.reap_dbs(sys.argv[1])
+
+