Skip to content

Commit ba0fcb2

Browse files
Styleguide and remove print statement
1 parent 0aca682 commit ba0fcb2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"http.server.request.size": _duration_attrs,
5959
}
6060

61-
simulated_background_task_execution_time_s = 0.01
61+
_SIMULATED_BACKGROUND_TASK_EXECUTION_TIME_S = 0.01
6262

6363

6464
async def http_app(scope, receive, send):
@@ -156,7 +156,7 @@ async def background_execution_asgi(scope, receive, send):
156156
"body": b"*",
157157
}
158158
)
159-
time.sleep(simulated_background_task_execution_time_s)
159+
time.sleep(_SIMULATED_BACKGROUND_TASK_EXECUTION_TIME_S)
160160

161161

162162
async def error_asgi(scope, receive, send):
@@ -326,10 +326,9 @@ def test_background_execution(self):
326326
server_span = span_list[-1]
327327
assert server_span.kind == SpanKind.SERVER
328328
span_duration_nanos = server_span.end_time - server_span.start_time
329-
print(span_duration_nanos)
330329
self.assertLessEqual(
331330
span_duration_nanos,
332-
simulated_background_task_execution_time_s * 10**9,
331+
_SIMULATED_BACKGROUND_TASK_EXECUTION_TIME_S * 10**9,
333332
)
334333

335334
def test_override_span_name(self):

0 commit comments

Comments
 (0)