Skip to content

Commit

Permalink
fix test fixtures setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jell-o-fishi committed Nov 28, 2023
1 parent 0135aa2 commit 7b871a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/tools/fixtures_aioquic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 4 additions & 1 deletion tests/tools/fixtures_http3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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()

0 comments on commit 7b871a5

Please sign in to comment.