diff --git a/cdp_backend/tests/utils/test_file_utils.py b/cdp_backend/tests/utils/test_file_utils.py index 5391c623..56a80a8c 100644 --- a/cdp_backend/tests/utils/test_file_utils.py +++ b/cdp_backend/tests/utils/test_file_utils.py @@ -12,6 +12,7 @@ import imageio import pytest import requests_mock +from flaky import flaky from requests import HTTPError from cdp_backend.utils import file_utils @@ -344,6 +345,7 @@ def test_convert_video_to_mp4( # (EXAMPLE_M3U8_PLAYLIST_URI, None), ], ) +@flaky(max_runs=3, min_passes=1) def test_remote_resource_copy( resources_dir: Path, uri: str, @@ -359,7 +361,7 @@ def test_remote_resource_copy( os.remove(actual_uri) - time.sleep(5) + time.sleep(10) def test_invalid_uri() -> None: diff --git a/pyproject.toml b/pyproject.toml index 8c97d63b..576a953e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,6 +101,7 @@ test = [ "pytest>=5.4.3", "pytest-cov>=2.9.0", "pytest-raises>=0.11", + "flaky>=3.7.0", # Extras "networkx>=2.5", "pydot>=1.4",