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

bpo-32458: Increase TLS timeout in test_asyncio by vstinner · Pull Request #7157 · python/cpython · GitHub

/ cpython Public
Closed
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
6 changes: 3 additions & 3 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 @@ -248,6 +248,7 @@ async def client(addr):

def test_start_tls_server_1(self):
HELLO_MSG = b'1' * 1024 * 1024
TIMEOUT = 60 # seconds

server_context = test_utils.simple_server_sslcontext()
client_context = test_utils.simple_client_sslcontext()
Expand All @@ -256,7 +257,7 @@ def test_start_tls_server_1(self):

def client(sock, addr):
time.sleep(0.5)
sock.settimeout(5)
sock.settimeout(TIMEOUT)

sock.connect(addr)
data = sock.recv_all(len(HELLO_MSG))
Expand Down Expand Up @@ -309,7 +310,7 @@ async def main():

with self.tcp_client(lambda sock: client(sock, addr)):
self.loop.run_until_complete(
asyncio.wait_for(main(), loop=self.loop, timeout=10))
asyncio.wait_for(main(), loop=self.loop, timeout=TIMEOUT * 2))

def test_start_tls_wrong_args(self):
async def main():
Expand All @@ -332,7 +333,6 @@ def new_loop(self):

@unittest.skipIf(ssl is None, 'No ssl module')
@unittest.skipUnless(hasattr(asyncio, 'ProactorEventLoop'), 'Windows only')
@unittest.skipIf(os.environ.get('APPVEYOR'), 'XXX: issue 32458')
class ProactorStartTLSTests(BaseStartTLS, unittest.TestCase):

def new_loop(self):
Expand Down

Back | FazBrowse Home | New Git URL