async def METHOD_NAME(message_type):
    """The client calls shutdown"""
    async def client_node(port):
        ep = await ucp.create_endpoint(
            ucp.get_address(),
            port,
        )
        with pytest.raises(ucp.exceptions.UCXCanceled):
            await asyncio.gather(_shutdown_recv(ep, message_type), ep.close())
    async def server_node(ep):
        with pytest.raises(ucp.exceptions.UCXCanceled):
            await _shutdown_recv(ep, message_type)
    listener = ucp.create_listener(
        server_node,
    )
    await client_node(listener.port)