[Checkins] SVN: zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py don't bind the HTTP server to the port until the test is ready to start (caused

Benji York benji at zope.com
Wed Jun 28 09:46:16 EDT 2006


Log message for revision 68881:
  don't bind the HTTP server to the port until the test is ready to start (caused
  spurious test failures)
  

Changed:
  U   zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py

-=-
Modified: zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py
===================================================================
--- zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py	2006-06-28 12:50:34 UTC (rev 68880)
+++ zc.authorizedotnet/trunk/src/zc/authorizedotnet/tests.py	2006-06-28 13:46:15 UTC (rev 68881)
@@ -228,11 +228,12 @@
             self.handle_request()
 
 
-http_server = TestHttpServer(('localhost', TEST_SERVER_PORT),
-                             TestRequestHandler)
 in_process_server = InProcessServer()
 
 def localSetUp(test):
+    global http_server
+    http_server = TestHttpServer(('localhost', TEST_SERVER_PORT),
+                                 TestRequestHandler)
     http_server.thread = threading.Thread(target=http_server.serve_forever)
     http_server.thread.start()
     test.globs['LOGIN'] = 'LOGIN'



More information about the Checkins mailing list