[Python-checkins] bpo-38912: fix close before connect callback in test_asyncio SSL tests (GH-22691)

Justin Turner Arthur webhook-mailer at python.org
Mon Oct 19 21:19:01 EDT 2020


https://github.com/python/cpython/commit/de73d432bb29f6439f2db16cb991e15e09c70c26
commit: de73d432bb29f6439f2db16cb991e15e09c70c26
branch: master
author: Justin Turner Arthur <justinarthur at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-10-19T21:18:57-04:00
summary:

bpo-38912: fix close before connect callback in test_asyncio SSL tests (GH-22691)

Reduces the rate at which the ENV CHANGED failure occurs in test_asyncio SSL tests (due to unclosed transport), but does not 100% resolve it.

files:
M Lib/test/test_asyncio/test_events.py
M Misc/ACKS

diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index ef9d6fc48e9f8..b8fe466cd53df 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1076,6 +1076,7 @@ def test_create_unix_server_ssl_verified(self):
                                                ssl=sslcontext_client,
                                                server_hostname='localhost')
         client, pr = self.loop.run_until_complete(f_c)
+        self.loop.run_until_complete(proto.connected)
 
         # close connection
         proto.transport.close()
@@ -1101,6 +1102,7 @@ def test_create_server_ssl_verified(self):
                                           ssl=sslcontext_client,
                                           server_hostname='localhost')
         client, pr = self.loop.run_until_complete(f_c)
+        self.loop.run_until_complete(proto.connected)
 
         # extra info is available
         self.check_ssl_extra_info(client, peername=(host, port),
diff --git a/Misc/ACKS b/Misc/ACKS
index 687bcb2c6abab..0aab4567d6ee9 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -70,6 +70,7 @@ Alexandru Ardelean
 Emmanuel Arias
 Alicia Arlen
 Jeffrey Armstrong
+Justin Turner Arthur
 Jason Asbahr
 David Ascher
 Ammar Askar



More information about the Python-checkins mailing list