Disable SSL test on versions of libcurl with blocking SSL handshakes.

(using gnutls instead of openssl and libcurl < 7.21.0).
This commit is contained in:
Ben Darnell 2010-09-07 17:02:50 -07:00
parent bb8d2fa458
commit afb82f6868
1 changed files with 9 additions and 2 deletions

View File

@ -39,6 +39,13 @@ class SSLTest(AsyncHTTPTestCase, LogTrapTestCase):
response = self.wait()
self.assertEqual(response.body, "Hello world")
if ssl is None:
# Don't try to run ssl tests if we don't have the ssl module
if (ssl is None or
(pycurl.version_info()[5].startswith('GnuTLS') and
pycurl.version_info()[2] < 0x71400)):
# Don't try to run ssl tests if we don't have the ssl module (python 2.5).
# Additionally, when libcurl (< 7.21.0) is compiled against gnutls
# instead of openssl (which is the default on at least some versions of
# ubuntu), libcurl does the ssl handshake in blocking mode. That will
# cause this test to deadlock as the blocking network ops happen in
# the same IOLoop as the server.
del SSLTest