]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Skip a closed connection test with curl and macOS 3398/head
authorBen Darnell <ben@bendarnell.com>
Tue, 11 Jun 2024 17:25:19 +0000 (13:25 -0400)
committerBen Darnell <ben@bendarnell.com>
Tue, 11 Jun 2024 17:25:19 +0000 (13:25 -0400)
Unclear what the issue is but skip the test for now.

tornado/test/iostream_test.py

index 02fcd3e13fed17a3cd83594dc12d66de65b90354..096dfa868a24ed894ae289127368e39c4001d996 100644 (file)
@@ -9,6 +9,7 @@ from tornado.iostream import (
     StreamClosedError,
     _StreamBuffer,
 )
+from tornado.httpclient import AsyncHTTPClient
 from tornado.httputil import HTTPHeaders
 from tornado.locks import Condition, Event
 from tornado.log import gen_log
@@ -70,6 +71,15 @@ class TestIOStreamWebMixin(object):
         # EPOLLRDHUP event delivered at the same time as the read event,
         # while kqueue reports them as a second read/write event with an EOF
         # flag.
+        if (
+            AsyncHTTPClient.configured_class().__name__.endswith("CurlAsyncHTTPClient")
+            and platform.system() == "Darwin"
+        ):
+            # It's possible that this is Tornado's fault, either in AsyncIOLoop or in
+            # CurlAsyncHTTPClient, but we've also seen this kind of issue in libcurl itself
+            # (especially a long time ago). The error is tied to the use of Apple's
+            # SecureTransport instead of OpenSSL.
+            self.skipTest("libcurl doesn't handle closed connections cleanly on macOS")
         response = self.fetch("/", headers={"Connection": "close"})
         response.rethrow()