Commit 361d2553 authored by Stefan H. Holek's avatar Stefan H. Holek

Fixed a test that would repeatedly cause hangs on this screaming dual G4 box.

parent ce38ca8e
......@@ -17,6 +17,7 @@ $Id$
"""
import unittest
import threading
import time
from SimpleHTTPServer import SimpleHTTPRequestHandler
from BaseHTTPServer import HTTPServer
......@@ -51,7 +52,7 @@ class AcceleratedHTTPCacheTests(unittest.TestCase):
def tearDown(self):
if self.thread:
self.httpd.server_close()
self.thread.join()
self.thread.join(2)
def _getTargetClass(self):
......@@ -73,7 +74,9 @@ class AcceleratedHTTPCacheTests(unittest.TestCase):
sa = self.httpd.socket.getsockname()
self.thread = threading.Thread(target=self.httpd.handle_request)
self.thread.setDaemon(True)
self.thread.start()
time.sleep(0.2) # Allow time for server startup
def test_PURGE_passes_Host_header(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment