summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-06-11 14:46:45 (GMT)
committerGitHub <noreply@github.com>2017-06-11 14:46:45 (GMT)
commit83d30bd667924549bacf1428ac3e475cdf9792ae (patch)
tree5f48fdc6177e267a177df63f5d398b761157de8a /Lib/test/test_asyncio
parent176f2ebdad93f20876c08efabd364a0e6c86de14 (diff)
downloadcpython-83d30bd667924549bacf1428ac3e475cdf9792ae.zip
cpython-83d30bd667924549bacf1428ac3e475cdf9792ae.tar.gz
cpython-83d30bd667924549bacf1428ac3e475cdf9792ae.tar.bz2
Revert "[3.6] bpo-29406: asyncio SSL contexts leak sockets after calling close with certain servers (GH-409) (#2062)" (#2112)
This reverts commit 6e14fd2a14cef6ea0709ad234ab41198c2195591.
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_sslproto.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py
index 6bcaa9e..bcd236e 100644
--- a/Lib/test/test_asyncio/test_sslproto.py
+++ b/Lib/test/test_asyncio/test_sslproto.py
@@ -96,40 +96,6 @@ class SslProtoHandshakeTests(test_utils.TestCase):
test_utils.run_briefly(self.loop)
self.assertIsInstance(waiter.exception(), ConnectionAbortedError)
- def test_close_abort(self):
- # From issue #bpo-29406
- # abort connection if server does not complete shutdown procedure
- ssl_proto = self.ssl_protocol()
- transport = self.connection_made(ssl_proto)
- ssl_proto._on_handshake_complete(None)
- ssl_proto._start_shutdown()
- self.assertIsNotNone(ssl_proto._shutdown_timeout_handle)
-
- exc_handler = mock.Mock()
- self.loop.set_exception_handler(exc_handler)
- ssl_proto._shutdown_timeout_handle._run()
-
- exc_handler.assert_called_with(
- self.loop, {'message': 'Can not complete shitdown operation',
- 'exception': mock.ANY,
- 'transport': transport,
- 'protocol': ssl_proto}
- )
- self.assertIsNone(ssl_proto._shutdown_timeout_handle)
-
- def test_close(self):
- # From issue #bpo-29406
- # abort connection if server does not complete shutdown procedure
- ssl_proto = self.ssl_protocol()
- transport = self.connection_made(ssl_proto)
- ssl_proto._on_handshake_complete(None)
- ssl_proto._start_shutdown()
- self.assertIsNotNone(ssl_proto._shutdown_timeout_handle)
-
- ssl_proto._finalize()
- self.assertIsNone(ssl_proto._transport)
- self.assertIsNone(ssl_proto._shutdown_timeout_handle)
-
def test_close_during_handshake(self):
# bpo-29743 Closing transport during handshake process leaks socket
waiter = asyncio.Future(loop=self.loop)