Skip to content

bpo-32458: Increase TLS timeout in test_asyncio #7157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Lib/test/test_asyncio/test_sslproto.py
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