Skip to content

Commit

Permalink
More waiting styles
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbull committed Aug 14, 2024
1 parent da5c82b commit 417fa2a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path

import pytest
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_fixed
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_random_exponential

from cloudpathlib.enums import FileCacheMode
from cloudpathlib.exceptions import (
Expand Down Expand Up @@ -505,8 +505,9 @@ def test_manual_cache_clearing(rig: CloudProviderTestRig):
# in CI there can be a lag before the cleanup actually happens
@retry(
retry=retry_if_exception_type(AssertionError),
wait=wait_fixed(1),
stop=stop_after_attempt(5),
wait=wait_random_exponential(multiplier=0.5, max=5),
stop=stop_after_attempt(10),
reraise=True,
)
def _resilient_assert():
gc.collect() # force gc before asserting
Expand Down

0 comments on commit 417fa2a

Please sign in to comment.