Skip to content

Commit 2da0a99

Browse files
committed
iostream_test: Don't require server-side log on windows
1 parent 06e1a65 commit 2da0a99

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Diff for: tornado/test/iostream_test.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,12 @@ async def test_match(self):
11971197
@gen_test
11981198
async def test_no_match(self):
11991199
stream = SSLIOStream(socket.socket(), ssl_options=self.client_ssl_ctx)
1200-
with ExpectLog(gen_log, ".*alert bad certificate", level=logging.WARNING):
1200+
with ExpectLog(
1201+
gen_log,
1202+
".*alert bad certificate",
1203+
level=logging.WARNING,
1204+
required=platform.system() != "Windows",
1205+
):
12011206
with self.assertRaises(ssl.SSLCertVerificationError):
12021207
with ExpectLog(
12031208
gen_log,
@@ -1210,7 +1215,9 @@ async def test_no_match(self):
12101215
)
12111216
# The server logs a warning while cleaning up the failed connection.
12121217
# Unfortunately there's no good hook to wait for this logging.
1213-
await asyncio.sleep(0.1)
1218+
# It doesn't seem to happen on windows; I'm not sure why.
1219+
if platform.system() != "Windows":
1220+
await asyncio.sleep(0.1)
12141221

12151222
@gen_test
12161223
async def test_check_disabled(self):

0 commit comments

Comments
 (0)