Skip to content

Commit

Permalink
update k8s tests urllib3 retry config status_forcelist and allowed_me…
Browse files Browse the repository at this point in the history
…thods (apache#42871)
  • Loading branch information
gopidesupavan committed Oct 15, 2024
1 parent bdb89d3 commit e9e0f6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kubernetes_tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,12 @@ def _delete_airflow_pod(name=""):
def _get_session_with_retries(self):
session = requests.Session()
session.auth = ("admin", "admin")
retries = Retry(total=3, backoff_factor=1)
retries = Retry(
total=3,
backoff_factor=1,
status_forcelist=[404],
allowed_methods=Retry.DEFAULT_ALLOWED_METHODS | frozenset(["PATCH", "POST"]),
)
session.mount("http://", HTTPAdapter(max_retries=retries))
session.mount("https://", HTTPAdapter(max_retries=retries))
return session
Expand Down

0 comments on commit e9e0f6e

Please sign in to comment.