From 2da0a9912bc5207e2ac8207b40035377de3e1cd5 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Mon, 13 Nov 2023 22:11:59 -0500 Subject: [PATCH] iostream_test: Don't require server-side log on windows --- tornado/test/iostream_test.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index 8a2851800..02fcd3e13 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -1197,7 +1197,12 @@ class TestIOStreamCheckHostname(AsyncTestCase): @gen_test async def test_no_match(self): stream = SSLIOStream(socket.socket(), ssl_options=self.client_ssl_ctx) - with ExpectLog(gen_log, ".*alert bad certificate", level=logging.WARNING): + with ExpectLog( + gen_log, + ".*alert bad certificate", + level=logging.WARNING, + required=platform.system() != "Windows", + ): with self.assertRaises(ssl.SSLCertVerificationError): with ExpectLog( gen_log, @@ -1210,7 +1215,9 @@ class TestIOStreamCheckHostname(AsyncTestCase): ) # The server logs a warning while cleaning up the failed connection. # Unfortunately there's no good hook to wait for this logging. - await asyncio.sleep(0.1) + # It doesn't seem to happen on windows; I'm not sure why. + if platform.system() != "Windows": + await asyncio.sleep(0.1) @gen_test async def test_check_disabled(self): -- 2.47.2