Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #171 from schlamar/test-fixes

Fixes possible deadlock in threads.
  • Loading branch information...
commit 3fb01a2d6e5800262e56d6fc0bc035a01d9d0320 2 parents 5bd2b03 + ec3b546
@shazow authored
Showing with 9 additions and 0 deletions.
  1. +3 −0  CONTRIBUTORS.txt
  2. +6 −0 dummyserver/testcase.py
View
3  CONTRIBUTORS.txt
@@ -57,5 +57,8 @@ In chronological order:
* Sune Kirkeby <mig@ibofobi.dk>
* Optional SNI-support for Python 2 via PyOpenSSL.
+* Marc Schlaich <marc.schlaich@gmail.com>
+ * Various bugfixes and test improvements.
+
* [Your name or handle] <[email or website]>
* [Brief summary of your changes]
View
6 dummyserver/testcase.py
@@ -32,6 +32,11 @@ def _start_server(cls, socket_handler):
# Lock gets released by thread above
ready_lock.acquire()
+ @classmethod
+ def tearDownClass(cls):
+ if hasattr(cls, 'server_thread'):
+ cls.server_thread.join()
+
class HTTPDummyServerTestCase(unittest.TestCase):
scheme = 'http'
@@ -54,6 +59,7 @@ def _start_server(cls):
@classmethod
def _stop_server(cls):
cls.server_thread.stop()
+ cls.server_thread.join()
@classmethod
def setUpClass(cls):
Please sign in to comment.
Something went wrong with that request. Please try again.