Skip to content

Commit

Permalink
Close writers in test
Browse files Browse the repository at this point in the history
This is required so that the server can shutdown, after `wait_closed`
has been fixed in Python 3.12 to actually block.

See python/cpython#79033
  • Loading branch information
jgosmann committed Jan 7, 2024
1 parent f993a4b commit b99bc01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dmarc_metrics_exporter/tests/test_imap_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ async def test_timeout_behavior_waiting_for_server_ready():

async def client_connected_cb(reader: StreamReader, writer: StreamWriter):
await event.wait()
writer.close()

server = await start_server(client_connected_cb, host="localhost", port=4143)

Expand Down

0 comments on commit b99bc01

Please sign in to comment.