From afb82f686850116e4d3b360222c73e43a7e06ea5 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Tue, 7 Sep 2010 17:02:50 -0700 Subject: [PATCH] Disable SSL test on versions of libcurl with blocking SSL handshakes. (using gnutls instead of openssl and libcurl < 7.21.0). --- tornado/test/httpserver_test.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index c3b5f459..3d6de203 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -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