Skip to content

ci: Add rerun failures package for flaky tests #728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions tests/clients/test_urllib3.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@
import pytest
import requests
import urllib3

import tests.apps.flask_app # noqa: F401
from instana.instrumentation.urllib3 import (
_collect_kvs as collect_kvs,
extract_custom_headers,
)
from instana.instrumentation.urllib3 import (
collect_response,
extract_custom_headers,
)
from instana.singletons import agent, tracer

import tests.apps.flask_app # noqa: F401
from tests.helpers import testenv

if TYPE_CHECKING:
from instana.span.span import InstanaSpan
from pytest import LogCaptureFixture

from instana.span.span import InstanaSpan


class TestUrllib3:
@pytest.fixture(autouse=True)
Expand Down Expand Up @@ -136,6 +139,7 @@ def test_get_request(self):
assert isinstance(urllib3_span.stack, list)
assert len(urllib3_span.stack) > 1

@pytest.mark.flaky(reruns=3, reruns_delay=2)
def test_get_request_https(self):
request_url = "https://jsonplaceholder.typicode.com:443/todos/1"
with tracer.start_as_current_span("test"):
Expand Down
1 change: 1 addition & 0 deletions tests/requirements-minimal.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage>=5.5
pytest>=4.6
setuptools
pytest-rerunfailures
Loading