From 9d2fa016f1cf092314d006e86c239bc92c08070c Mon Sep 17 00:00:00 2001 From: halcy Date: Sun, 11 Feb 2024 15:32:41 +0200 Subject: [PATCH] add retrying --- pyproject.toml | 1 + tests/test_streaming.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5d570c2..9f35031 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,7 @@ test = [ 'pytest-mock', 'requests-mock', 'pytz', + 'pytest-retry' ] [project.urls] diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 799eaf1..a11e24b 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -316,6 +316,7 @@ def test_multiline_payload(): assert listener.updates == [{"foo": "bar"}] @pytest.mark.vcr(match_on=['path']) +@pytest.mark.flaky(retries=10, delay=1) def test_stream_user_direct(api, api2, api3, vcr): patch_streaming() @@ -386,6 +387,7 @@ def test_stream_user_direct(api, api2, api3, vcr): t.join() @pytest.mark.vcr(match_on=['path']) +@pytest.mark.flaky(retries=10, delay=1) def test_stream_user_local(api, api2, vcr): patch_streaming() @@ -420,6 +422,7 @@ def test_stream_user_local(api, api2, vcr): t.join() @pytest.mark.vcr(match_on=['path']) +@pytest.mark.flaky(retries=10, delay=1) def test_stream_direct(api, api2, vcr): patch_streaming()