Skip to content

Commit

Permalink
Add exception to retry list for CI env
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Gonzalez-Martin committed Nov 2, 2021
1 parent 81ca9bc commit a94d096
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/cli/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import aiohttp

from aiohttp.client_exceptions import ServerDisconnectedError
from aiohttp.client_exceptions import ClientOSError, ServerDisconnectedError
from aiohttp_retry import RetryClient, ExponentialRetry

from mlserver.types import RepositoryIndexResponse, InferenceRequest, InferenceResponse
Expand All @@ -17,7 +17,9 @@ async def close(self):
async def wait_until_ready(self) -> None:
endpoint = f"http://{self._http_server}/v2/health/ready"
retry_options = ExponentialRetry(
attempts=10, start_timeout=0.5, exceptions={ServerDisconnectedError}
attempts=10,
start_timeout=0.5,
exceptions={ClientOSError, ServerDisconnectedError},
)
retry_client = RetryClient(raise_for_status=True, retry_options=retry_options)

Expand Down

0 comments on commit a94d096

Please sign in to comment.