Skip to content

Commit c22e300

Browse files
committed
Fixes some tests.
1 parent 782e4e8 commit c22e300

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

instrumentation/opentelemetry-instrumentation-aiohttp-server/tests/test_aiohttp_server_integration.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,9 @@ async def server_fixture(tracer, aiohttp_server):
6666

6767

6868
def test_checking_instrumentor_pkg_installed():
69-
itered_entry_points = iter(entry_points(
70-
"opentelemetry_instrumentor", "aiohttp-server"))
7169

72-
instrumentor = next(itered_entry_points).load()()
70+
(instrumentor_entrypoint,) = entry_points(group="opentelemetry_instrumentor", name="aiohttp-server")
71+
instrumentor = instrumentor_entrypoint.load()()
7372
assert (isinstance(instrumentor, AioHttpServerInstrumentor))
7473

7574

@@ -98,7 +97,7 @@ async def test_status_code_instrumentation(
9897

9998
[span] = memory_exporter.get_finished_spans()
10099

101-
assert expected_method == span.attributes[SpanAttributes.HTTP_METHOD]
100+
assert expected_method.value == span.attributes[SpanAttributes.HTTP_METHOD]
102101
assert expected_status_code == span.attributes[SpanAttributes.HTTP_STATUS_CODE]
103102

104103
assert f"http://{server.host}:{server.port}{url}" == span.attributes[

0 commit comments

Comments
 (0)