async def METHOD_NAME(caplog):
    """Assert the on_error callback logs a warning."""
    error_msg = 'test error'
    with caplog.at_level(logging.WARNING):
        queue = QueueService()
        await queue.on_error(e=Exception(error_msg))
        assert error_msg in caplog.text