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

Miss Skeleton (bot) webhook-mailer at python.org
Mon Oct 19 21:44:09 EDT 2020


https://github.com/python/cpython/commit/3faef630a44be2d1ea5516e85e95fef4fd027a95
commit: 3faef630a44be2d1ea5516e85e95fef4fd027a95
branch: 3.8
author: Miss Skeleton (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-10-19T18:44:05-07: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.
(cherry picked from commit de73d432bb29f6439f2db16cb991e15e09c70c26)

Co-authored-by: Justin Turner Arthur <justinarthur at gmail.com>

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 85838f17678af..cec7e94a4f3c4 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1071,6 +1071,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()
@@ -1096,6 +1097,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 5584d5d54a0b2..35cabc7248bb4 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -67,6 +67,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