diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-02-08 22:57:02 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-02-08 22:57:02 -0500 |
commit | 11a8440bc43aa9f7eb6f2cb7b7f43e0cf6680f41 (patch) | |
tree | b5a7ee1c18231d272e1c771fb91f96fce9ada528 /reap_oracle_dbs.py | |
parent | 00a05e357b5bcc37c66256bc08c1198541475739 (diff) | |
download | sqlalchemy-11a8440bc43aa9f7eb6f2cb7b7f43e0cf6680f41.tar.gz |
- Testing reveals that we have *no* weak references to any cx_Oracle connections at all,
yet cx_Oracle still has open sessions that cannot be killed until process dies.
Oracle wins! Add a completely separate DB reaper script that runs
after py.test is done.
Diffstat (limited to 'reap_oracle_dbs.py')
-rw-r--r-- | reap_oracle_dbs.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/reap_oracle_dbs.py b/reap_oracle_dbs.py new file mode 100644 index 000000000..ff638a01e --- /dev/null +++ b/reap_oracle_dbs.py @@ -0,0 +1,24 @@ +"""Drop Oracle 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. + +""" +from sqlalchemy.testing.plugin import plugin_base +from sqlalchemy.testing import engines +from sqlalchemy.testing import provision +import logging + +logging.basicConfig() +logging.getLogger(provision.__name__).setLevel(logging.INFO) + +plugin_base.read_config() +oracle = plugin_base.file_config.get('db', 'oracle') +from sqlalchemy.testing import provision + +engine = engines.testing_engine(oracle, {}) +provision.reap_oracle_dbs(engine) + + |