Skip to content
Closed
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dev = [
"pytest",
"pytest-cov",
"pytest-mock",
"pytest-rerunfailures",
"pre-commit>=3.0.0",
"ruff"
]
Expand Down
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
Loading