Skip to content

Commit

Permalink
Add test cases for stability
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 24, 2024
1 parent 0a95032 commit ea66cac
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tosfs/tests/test_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import pytest
import requests
from tos.exceptions import TosServerError, TosClientError
from tos.exceptions import TosClientError, TosServerError
from tos.http import Response
from urllib3.exceptions import ProtocolError

Expand Down Expand Up @@ -48,15 +48,17 @@
True,
),
(
TosClientError('http request timeout',
ConnectionError(
ProtocolError(
'Connection aborted.',
ConnectionResetError(104, 'Connection reset by peer')
))
),
True
)
TosClientError(
"http request timeout",
ConnectionError(
ProtocolError(
"Connection aborted.",
ConnectionResetError(104, "Connection reset by peer"),
)
),
),
True,
),
],
)
def test_is_retry_exception(
Expand Down

0 comments on commit ea66cac

Please sign in to comment.