FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-32458: Further tune start_tls tests by 1st1 · Pull Request #7166 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
10 changes: 6 additions & 4 deletions Lib/test/test_asyncio/test_sslproto.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ async def client(addr):

new_tr.close()

with self.tcp_server(serve) as srv:
with self.tcp_server(serve, timeout=self.TIMEOUT) as srv:
self.loop.run_until_complete(
asyncio.wait_for(client(srv.addr), loop=self.loop, timeout=10))

Expand Down Expand Up @@ -358,7 +358,7 @@ async def client(addr):

new_tr.close()

with self.tcp_server(serve) as srv:
with self.tcp_server(serve, timeout=self.TIMEOUT) as srv:
self.loop.run_until_complete(
asyncio.wait_for(client(srv.addr),
loop=self.loop, timeout=self.TIMEOUT))
Expand Down Expand Up @@ -412,7 +412,8 @@ async def main(proto, on_con, on_eof, on_con_lost):

new_tr = await self.loop.start_tls(
tr, proto, server_context,
server_side=True)
server_side=True,
ssl_handshake_timeout=self.TIMEOUT)

await on_eof
await on_con_lost
Expand All @@ -429,7 +430,8 @@ async def run_main():
lambda: proto, '127.0.0.1', 0)
addr = server.sockets[0].getsockname()

with self.tcp_client(lambda sock: client(sock, addr)):
with self.tcp_client(lambda sock: client(sock, addr),
timeout=self.TIMEOUT):
await asyncio.wait_for(
main(proto, on_con, on_eof, on_con_lost),
loop=self.loop, timeout=self.TIMEOUT)
Expand Down

Back | FazBrowse Home | New Git URL