Add retrying to TestClient