Skip to content

Commit

Permalink
remove retry dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mastastny committed Nov 28, 2024
1 parent 6252fd0 commit 4d163e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ types-braintree = "*"
types-stripe = "*"
types-Pillow = "*"
black = "*"
types-retry = "*"
# Have commented out python-language-server to make it available quickly
# for the development
#python-language-server = "*"
Expand Down Expand Up @@ -59,7 +58,6 @@ pytest-persistence = "*"
pytest-metadata = ">=3.0.0"
pytest-html = "*"
ansi2html = "*"
retry = "==0.9.2"

[requires]
python_version = "3"
7 changes: 5 additions & 2 deletions testsuite/tests/ui/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import pytest
import pytest_html
from auth0.management import auth0
from retry.api import retry
from selenium.common import InvalidSessionIdException, WebDriverException
from threescale_api.errors import ApiClientError
from threescale_api.resources import Account, ApplicationPlan, Service
Expand Down Expand Up @@ -254,7 +253,11 @@ def _custom_ui_backend(name: str, system_name: str, description: str = "", endpo
backend.create(name, system_name, description, endpoint)
backend = resilient.resource_read_by_name(threescale.backends, system_name)
if autoclean and not testconfig["skip_cleanup"]:
request.addfinalizer(retry(exceptions=ApiClientError, tries=3, delay=1, backoff=2)(backend.delete))

@backoff.on_exception(backoff.fibo, ApiClientError, max_tries=3, jitter=None)
def finalizer():
backend.delete()

return backend

return _custom_ui_backend
Expand Down

0 comments on commit 4d163e2

Please sign in to comment.