Skip to content

Commit f9a814f

Browse files
CagriYoncaGSVarsha
authored andcommitted
fix: change request url for urllib
Signed-off-by: Cagri Yonca <cagri@ibm.com>
1 parent 306df0d commit f9a814f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/clients/test_urllib3.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def make_request(u=None) -> int:
8282

8383
threadpool_size = 15
8484
pool = ThreadPool(processes=threadpool_size)
85-
res = pool.map(make_request, [u for u in range(threadpool_size)])
85+
_ = pool.map(make_request, [u for u in range(threadpool_size)])
8686
# print(f'requests made within threadpool, instana does not instrument - statuses: {res}')
8787

8888
spans = self.recorder.queued_spans()
@@ -137,7 +137,7 @@ def test_get_request(self):
137137
assert len(urllib3_span.stack) > 1
138138

139139
def test_get_request_https(self):
140-
request_url = "https://reqres.in:443/api/users"
140+
request_url = "https://jsonplaceholder.typicode.com:443/todos/1"
141141
with tracer.start_as_current_span("test"):
142142
r = self.http.request("GET", request_url)
143143

@@ -631,7 +631,9 @@ def test_exception_logging(self):
631631
assert test_span.data["sdk"]["name"] == "test"
632632
assert urllib3_span.n == "urllib3"
633633
assert urllib3_span.data["http"]["status"] == 500
634-
assert urllib3_span.data["http"]["url"] == testenv["flask_server"] + "/exception"
634+
assert (
635+
urllib3_span.data["http"]["url"] == testenv["flask_server"] + "/exception"
636+
)
635637
assert urllib3_span.data["http"]["method"] == "GET"
636638
assert urllib3_span.stack
637639
assert isinstance(urllib3_span.stack, list)

0 commit comments

Comments
 (0)