Skip to content

Commit e047239

Browse files
authored
bpo-43921: ignore failing test_wrong_cert_tls13 on Windows (GH-25561)
test_wrong_cert_tls13 sometimes fails on some Windows buildbots. Turn failing test case into skipped test case until we have more time to investigate. Signed-off-by: Christian Heimes <[email protected]>
1 parent 019e9e8 commit e047239

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Lib/test/test_ssl.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3163,7 +3163,9 @@ def test_wrong_cert_tls13(self):
31633163
s.connect((HOST, server.port))
31643164
try:
31653165
s.write(b'data')
3166-
s.read(4)
3166+
s.read(1000)
3167+
s.write(b'should have failed already')
3168+
s.read(1000)
31673169
except ssl.SSLError as e:
31683170
if support.verbose:
31693171
sys.stdout.write("\nSSLError is %r\n" % e)
@@ -3173,7 +3175,13 @@ def test_wrong_cert_tls13(self):
31733175
if support.verbose:
31743176
sys.stdout.write("\nsocket.error is %r\n" % e)
31753177
else:
3176-
self.fail("Use of invalid cert should have failed!")
3178+
if sys.platform == "win32":
3179+
self.skipTest(
3180+
"Ignoring failed test_wrong_cert_tls13 test case. "
3181+
"The test is flaky on Windows, see bpo-43921."
3182+
)
3183+
else:
3184+
self.fail("Use of invalid cert should have failed!")
31773185

31783186
def test_rude_shutdown(self):
31793187
"""A brutal shutdown of an SSL server should raise an OSError

0 commit comments

Comments
 (0)