Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1743 from unaizalakain/ticket_21172

Fixed #21172 -- have LiveServerThread follow the semantics of threading.Thread.join()
  • Loading branch information...
commit 1830f50493cae042dac11957af986b0fd84f889f 2 parents a8e8452 + cb32175
@akaariai akaariai authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/test/testcases.py
View
7 django/test/testcases.py
@@ -1068,12 +1068,14 @@ def run(self):
self.error = e
self.is_ready.set()
- def join(self, timeout=None):
+ def terminate(self):
+ """
+ Shuts down live WSGI server.
+ """
if hasattr(self, 'httpd'):
# Stop the WSGI server
self.httpd.shutdown()
self.httpd.server_close()
- super(LiveServerThread, self).join(timeout)
class LiveServerTestCase(TransactionTestCase):
@@ -1153,6 +1155,7 @@ def _tearDownClassInternal(cls):
# reasons has raised an exception.
if hasattr(cls, 'server_thread'):
# Terminate the live server's thread
+ cls.server_thread.terminate()
cls.server_thread.join()
# Restore sqlite connections' non-sharability
Please sign in to comment.
Something went wrong with that request. Please try again.