async def test_close_connection_in_parent(self, master_host):
        """
        A connection owned by a parent is unusable by a child if the parent
        (the owning process) closes the connection.
        """
        conn = Connection(host=master_host)
        await conn.send_command("ping")
        assert await conn.read_response() == b"PONG"

        def target(conn, ev):
            ev.wait()
            # the parent closed the connection. because it also created the
            # connection, the connection is shutdown and the child
            # cannot use it.
            with pytest.raises(ConnectionError):
                asyncio.get_event_loop().run_until_complete(conn.send_command("ping"))

        ev = multiprocessing.Event()
        proc = multiprocessing.Process(target=target, args=(conn, ev))
        proc.start()

        await conn.disconnect()
        ev.set()

        proc.join(3)
        assert proc.exitcode == 0

        A connection owned by a parent is unusable by a child if the parent
        (the owning process) closes the connection.
        
tests/test_multiprocessing.py