Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ def __init__(
async_workers: int = 5,
logging: bool = True,
max_retries: int = 3,
max_retry_delay: int = 60,
proxies: Any | None = None,
timeout: None | float | tuple[float, float] | tuple[float, None] | None = None,
auth: tuple[str, str] | None = None,
Expand Down Expand Up @@ -611,7 +612,7 @@ def __init__(
assert isinstance(self._options["headers"], dict) # for mypy benefit

# Create Session object and update with config options first
self._session = ResilientSession(timeout=timeout)
self._session = ResilientSession(timeout=timeout, max_retries=max_retries, max_retry_delay=max_retry_delay)
# Add the client authentication certificate to the request if configured
self._add_client_cert_to_session()
# Add the SSL Cert to the request if configured
Expand All @@ -622,8 +623,6 @@ def __init__(
if "cookies" in self._options:
self._session.cookies.update(self._options["cookies"])

self._session.max_retries = max_retries

if proxies:
self._session.proxies = proxies

Expand Down
13 changes: 13 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,16 @@ def test_experimental_non_200_not_404_405(

assert ex.value.status_code == status_code
assert isinstance(ex.value, JIRAError)


def test_client_retry_config():
client = jira.client.JIRA(
server="https://jira.example.com",
get_server_info=False,
validate=False,
max_retries=81,
max_retry_delay=111,
)

assert client._session.max_retries == 81
assert client._session.max_retry_delay == 111
Loading