From: Ben Darnell Date: Mon, 23 Jan 2012 02:15:01 +0000 (-0800) Subject: Add a timeout to test_sslv2_fail so it passes on cygwin. X-Git-Tag: v2.2.0~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=463baf434793ca48cc892bcdcb7d3d8c6e8d887a;p=thirdparty%2Ftornado.git Add a timeout to test_sslv2_fail so it passes on cygwin. --- diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index 9a5c201ee..1a53a34fd 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -113,7 +113,12 @@ if hasattr(ssl, 'PROTOCOL_SSLv2'): # we've got all the other ssl version tests here. # Clients should have SSLv2 disabled by default. try: - response = self.fetch('/') + # The server simply closes the connection when it gets + # an SSLv2 ClientHello packet. + # request_timeout is needed here because on some platforms + # (cygwin, but not native windows python), the close is not + # detected promptly. + response = self.fetch('/', request_timeout=1) except ssl.SSLError: # In some python/ssl builds the PROTOCOL_SSLv2 constant # exists but SSLv2 support is still compiled out, which