Skip to content

Commit

Permalink
Add a timeout to test_sslv2_fail so it passes on cygwin.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Jan 23, 2012
1 parent e04957d commit 463baf4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tornado/test/httpserver_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ def test_sslv2_fail(self):
# 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
Expand Down

0 comments on commit 463baf4

Please sign in to comment.