diff --git a/distributed/comm/tests/test_comms.py b/distributed/comm/tests/test_comms.py index c8f993de742..fe1f4855f5f 100644 --- a/distributed/comm/tests/test_comms.py +++ b/distributed/comm/tests/test_comms.py @@ -896,6 +896,7 @@ async def test_retry_connect(tcp, monkeypatch): async def echo(comm): message = await comm.read() await comm.write(message) + await comm.close() class UnreliableConnector(tcp.TCPConnector): def __init__(self): @@ -922,6 +923,7 @@ class UnreliableBackend(tcp.TCPBackend): await comm.write(b"test") msg = await comm.read() assert msg == b"test" + await comm.close() finally: listener.stop()