Skip to content

Commit 6a6d3c5

Browse files
authored
Rerun flaky tests when live cloud (#516)
Co-authored-by: Jay Qi <[email protected]>
1 parent 609f87e commit 6a6d3c5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pytest-cases
2525
pytest-cov
2626
pytest-duration-insights
2727
pytest-reportlog
28+
pytest-rerunfailures
2829
pytest-xdist
2930
python-dotenv
3031
pywin32; sys_platform == 'win32'

tests/test_caching.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ def test_environment_variable_local_cache_dir(rig: CloudProviderTestRig, tmpdir)
319319
os.environ["CLOUDPATHLIB_LOCAL_CACHE_DIR"] = original_env_setting
320320

321321

322+
@pytest.mark.flaky(reruns=3, reruns_delay=1, condition=os.getenv("USE_LIVE_CLOUD") == "1")
322323
def test_environment_variables_force_overwrite_from(rig: CloudProviderTestRig, tmpdir):
323324
# environment instantiation
324325
original_env_setting = os.environ.get("CLOUDPATHLIB_FORCE_OVERWRITE_FROM_CLOUD", "")
@@ -354,6 +355,7 @@ def test_environment_variables_force_overwrite_from(rig: CloudProviderTestRig, t
354355
os.environ["CLOUDPATHLIB_FORCE_OVERWRITE_FROM_CLOUD"] = original_env_setting
355356

356357

358+
@pytest.mark.flaky(reruns=3, reruns_delay=1, condition=os.getenv("USE_LIVE_CLOUD") == "1")
357359
def test_environment_variables_force_overwrite_to(rig: CloudProviderTestRig, tmpdir):
358360
# environment instantiation
359361
original_env_setting = os.environ.get("CLOUDPATHLIB_FORCE_OVERWRITE_TO_CLOUD", "")

0 commit comments

Comments
 (0)