Skip to content
Snippets Groups Projects
Commit 7901ff11 authored by Damian Johnson's avatar Damian Johnson
Browse files

Unexpected exceptions during async tests deadlocked

When an asynchrously ran test raised a non-assertion exception the subsiquent
recv call on the pipe would never complete...

  https://trac.torproject.org/projects/tor/ticket/22902
parent 7a09b770
Branches
Tags
No related merge requests found
......@@ -33,8 +33,9 @@ import linecache
import multiprocessing
import os
import re
import time
import threading
import time
import traceback
import unittest
import stem.prereq
......@@ -167,6 +168,8 @@ class AsyncTest(object):
conn.send(AsyncResult('failure', str(exc)))
except SkipTest as exc:
conn.send(AsyncResult('skipped', str(exc)))
except:
conn.send(AsyncResult('error', traceback.format_exc()))
finally:
conn.close()
......@@ -207,6 +210,8 @@ class AsyncTest(object):
if test and self._result.type == 'failure':
test.fail(self._result.msg)
elif test and self._result.type == 'error':
test.fail(self._result.msg)
elif test and self._result.type == 'skipped':
test.skipTest(self._result.msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment