Skip to content

Commit 169140f

Browse files
committed
fix httpx
Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
1 parent 41455ee commit 169140f

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,7 @@ def _is_url_tuple(request: "RequestInfo"):
9898

9999

100100
def _async_call(coro: typing.Coroutine) -> asyncio.Task:
101-
loop = asyncio.new_event_loop()
102-
asyncio.set_event_loop(loop)
103-
try:
104-
return loop.run_until_complete(coro)
105-
finally:
106-
loop.close()
101+
return asyncio.run(coro)
107102

108103

109104
def _response_hook(span, request: "RequestInfo", response: "ResponseInfo"):

0 commit comments

Comments
 (0)