Commit 73ea5462 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)

test_ssl.test_pha_required_nocert() now uses
support.catch_threading_exception() to ignore the expected SSLError
in ConnectionHandler of ThreadedEchoServer (it is only raised
sometimes on Windows).
parent 430a9f44
...@@ -4326,6 +4326,9 @@ class TestPostHandshakeAuth(unittest.TestCase): ...@@ -4326,6 +4326,9 @@ class TestPostHandshakeAuth(unittest.TestCase):
server_context.verify_mode = ssl.CERT_REQUIRED server_context.verify_mode = ssl.CERT_REQUIRED
client_context.post_handshake_auth = True client_context.post_handshake_auth = True
# Ignore expected SSLError in ConnectionHandler of ThreadedEchoServer
# (it is only raised sometimes on Windows)
with support.catch_threading_exception() as cm:
server = ThreadedEchoServer(context=server_context, chatty=False) server = ThreadedEchoServer(context=server_context, chatty=False)
with server: with server:
with client_context.wrap_socket(socket.socket(), with client_context.wrap_socket(socket.socket(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment