diff --git a/tests/socket_ssl.py b/tests/socket_ssl.py index 512d762..e772f4b 100644 --- a/tests/socket_ssl.py +++ b/tests/socket_ssl.py @@ -31,7 +31,7 @@ async def test(host: str, port: int, bufsize: int = 4096): print(f"Attempting a connection to {host}:{port}") await socket.connect((host, port)) print("Connected") - async with aiosched.with_context(): + async with aiosched.with_context(timeout=5, silent=True) as ctx: async with socket: # Closes the socket automatically print("Entered socket context manager, sending request data") @@ -51,7 +51,7 @@ async def test(host: str, port: int, bufsize: int = 4096): break if buffer: data = buffer.decode().split("\r\n") - print(f"HTTP Response below:") + print(f"HTTP Response below {'(might be incomplete)' if ctx.timed_out else ''}:") _print(f"Response: {data[0]}") _print("Headers:") content = False