]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38912: fix close before connect callback in test_asyncio SSL tests (GH-22691)
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 20 Oct 2020 01:44:05 +0000 (18:44 -0700)
committerGitHub <noreply@github.com>
Tue, 20 Oct 2020 01:44:05 +0000 (18:44 -0700)
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@gmail.com>
Lib/test/test_asyncio/test_events.py
Misc/ACKS

index 85838f17678af16d7b044c2722116b19bb09fecf..cec7e94a4f3c414ab12bf4fd45ae086c1295d964 100644 (file)
@@ -1071,6 +1071,7 @@ class EventLoopTestsMixin:
                                                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 @@ class EventLoopTestsMixin:
                                           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),
index 5584d5d54a0b250c87b2d3f95b039f5c8467d2ac..35cabc7248bb427e7aa7e97e8f06959f8bd3974e 100644 (file)
--- 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