diff --git a/tests/tools/fixtures_aioquic.py b/tests/tools/fixtures_aioquic.py index f8ed83e4..34f56032 100644 --- a/tests/tools/fixtures_aioquic.py +++ b/tests/tools/fixtures_aioquic.py @@ -26,6 +26,7 @@ async def pipe_factory_quic(generate_test_certificates, ) server: Optional[RSocketBase] = None + client: Optional[RSocketBase] = None wait_for_server = Event() def store_server(new_server): diff --git a/tests/tools/fixtures_http3.py b/tests/tools/fixtures_http3.py index fb3308db..91c005f6 100644 --- a/tests/tools/fixtures_http3.py +++ b/tests/tools/fixtures_http3.py @@ -19,6 +19,7 @@ async def pipe_factory_http3(generate_test_certificates, certificate, private_key = generate_test_certificates server: Optional[RSocketBase] = None + client: Optional[RSocketBase] = None wait_for_server = Event() def store_server(new_server): @@ -43,7 +44,9 @@ def store_server(new_server): await wait_for_server.wait() yield server, client finally: - await server.close() + if server is not None: + await server.close() + assert_no_open_streams(client, server) http3_server.close()