mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
[3.9] bpo-45011: Fix test_asyncio without C module _asyncio (GH-27968) (GH-27970)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7dc505b865
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
2cdbd3b8b2
commit
970533e65c
6 changed files with 14 additions and 7 deletions
|
@ -278,6 +278,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
|
||||
# No garbage is left if SSL is closed uncleanly
|
||||
client_context = weakref.ref(client_context)
|
||||
support.gc_collect()
|
||||
self.assertIsNone(client_context())
|
||||
|
||||
def test_create_connection_memory_leak(self):
|
||||
|
@ -341,6 +342,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
# No garbage is left for SSL client from loop.create_connection, even
|
||||
# if user stores the SSLTransport in corresponding protocol instance
|
||||
client_context = weakref.ref(client_context)
|
||||
support.gc_collect()
|
||||
self.assertIsNone(client_context())
|
||||
|
||||
def test_start_tls_client_buf_proto_1(self):
|
||||
|
@ -640,6 +642,7 @@ class BaseStartTLS(func_tests.FunctionalTestCaseMixin):
|
|||
# The 10s handshake timeout should be cancelled to free related
|
||||
# objects without really waiting for 10s
|
||||
client_sslctx = weakref.ref(client_sslctx)
|
||||
support.gc_collect()
|
||||
self.assertIsNone(client_sslctx())
|
||||
|
||||
def test_create_connection_ssl_slow_handshake(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue