From f8728c7cbc50d8230cc2aa97189fa2c5e85941b3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 19 Dec 2023 09:49:41 -1000 Subject: [PATCH] Make failure to increase the recv buffer size non-fatal We now try to set the buffer to 2097152, 1048576, 524288, 262144, 131072 before giving up and logging a warning --- tests/test_connection.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_connection.py b/tests/test_connection.py index 86597e8..0e60130 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -281,6 +281,9 @@ async def test_start_connection_cannot_increase_recv_buffer( assert "Unable to increase the socket receive buffer size to 131072" in caplog.text assert tried_sizes == [2097152, 1048576, 524288, 262144, 131072] + # Failure to increase the buffer size should not cause the connection to fail + assert conn.is_connected + @pytest.mark.asyncio async def test_start_connection_can_only_increase_buffer_size_to_262144( @@ -327,6 +330,9 @@ async def test_start_connection_can_only_increase_buffer_size_to_262144( assert "Unable to increase the socket receive buffer size" not in caplog.text assert tried_sizes == [2097152, 1048576, 524288, 262144] + # Failure to increase the buffer size should not cause the connection to fail + assert conn.is_connected + @pytest.mark.asyncio async def test_start_connection_times_out(