[Zope-Checkins] CVS: Products/StandardCacheManagers/tests - test_AcceleratedHTTPCacheManager.py:1.1.4.2

Stefan H. Holek stefan at epy.co.at
Thu Apr 21 17:45:04 EDT 2005


Update of /cvs-repository/Products/StandardCacheManagers/tests
In directory cvs.zope.org:/tmp/cvs-serv6118

Modified Files:
      Tag: Zope-2_7-branch
	test_AcceleratedHTTPCacheManager.py 
Log Message:
Fixed a test that would repeatedly cause hangs on this screaming dual G4 box.


=== Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py 1.1.4.1 => 1.1.4.2 ===
--- Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py:1.1.4.1	Fri Jan 14 14:57:40 2005
+++ Products/StandardCacheManagers/tests/test_AcceleratedHTTPCacheManager.py	Thu Apr 21 17:45:04 2005
@@ -17,6 +17,7 @@
 """
 import unittest
 import threading
+import time
 from SimpleHTTPServer import SimpleHTTPRequestHandler
 from BaseHTTPServer import HTTPServer
 
@@ -51,7 +52,7 @@
     def tearDown(self):
         if self.thread:
             self.httpd.server_close()
-            self.thread.join()
+            self.thread.join(2)
 
     def _getTargetClass(self):
 
@@ -73,7 +74,9 @@
 
         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):
 



More information about the Zope-Checkins mailing list