diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2012-09-10 11:34:52 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2012-09-24 18:59:33 -0700 |
commit | e0be91a4c9804828f4a2531cfdb785ff978e10cf (patch) | |
tree | 8d24f7d6a2294eaaf4af4e40f314c479300e2148 /test.py | |
parent | 212fe74f099fa240a73f3c42cf7e11bd56d7f885 (diff) |
Fixes to failing-test teardowns to avoid more exceptions or hangs
(cherry picked from commit 734f3d6f42ef1564f473fee5526e0354fc8196fc)
Conflicts:
test.py
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -28,6 +28,7 @@ import sys import unittest from optparse import OptionParser import paramiko +import threading sys.path.append('tests') @@ -141,7 +142,12 @@ def main(): if len(args) > 0: filter = '|'.join(args) suite = filter_suite_by_re(suite, filter) - runner.run(suite) + result = runner.run(suite) + # Clean up stale threads from poorly cleaned-up tests. + # TODO: make that not a problem, jeez + for thread in threading.enumerate(): + if thread is not threading.currentThread(): + thread._Thread__stop() if __name__ == '__main__': |