]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
iostream_test: Don't require server-side log on windows 3348/head
authorBen Darnell <ben@bendarnell.com>
Tue, 14 Nov 2023 03:11:59 +0000 (22:11 -0500)
committerBen Darnell <ben@bendarnell.com>
Tue, 14 Nov 2023 03:23:30 +0000 (22:23 -0500)
tornado/test/iostream_test.py

index 8a28518001e59fab099db422ad11f45316093b6d..02fcd3e13fed17a3cd83594dc12d66de65b90354 100644 (file)
@@ -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):