Add with-retries and tests