Skip to content

Commit 17b0f41

Browse files
committed
uncomment dev only change
1 parent 245c557 commit 17b0f41

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py

+27-27
Original file line numberDiff line numberDiff line change
@@ -498,33 +498,33 @@ def test_response_headers(self):
498498
self.memory_exporter.clear()
499499
set_global_response_propagator(orig)
500500

501-
# def test_credential_removal(self):
502-
# app = HttpServerMock("test_credential_removal")
503-
504-
# @app.route("/status/200")
505-
# def index():
506-
# return "hello"
507-
508-
# with app.run("localhost", 5000):
509-
# response = self.fetch(
510-
# "http://username:password@localhost:5000/status/200"
511-
# )
512-
# self.assertEqual(response.code, 200)
513-
514-
# spans = self.sorted_spans(self.memory_exporter.get_finished_spans())
515-
# self.assertEqual(len(spans), 1)
516-
# client = spans[0]
517-
518-
# self.assertEqual(client.name, "GET")
519-
# self.assertEqual(client.kind, SpanKind.CLIENT)
520-
# self.assertSpanHasAttributes(
521-
# client,
522-
# {
523-
# SpanAttributes.HTTP_URL: "http://localhost:5000/status/200",
524-
# SpanAttributes.HTTP_METHOD: "GET",
525-
# SpanAttributes.HTTP_STATUS_CODE: 200,
526-
# },
527-
# )
501+
def test_credential_removal(self):
502+
app = HttpServerMock("test_credential_removal")
503+
504+
@app.route("/status/200")
505+
def index():
506+
return "hello"
507+
508+
with app.run("localhost", 5000):
509+
response = self.fetch(
510+
"http://username:password@localhost:5000/status/200"
511+
)
512+
self.assertEqual(response.code, 200)
513+
514+
spans = self.sorted_spans(self.memory_exporter.get_finished_spans())
515+
self.assertEqual(len(spans), 1)
516+
client = spans[0]
517+
518+
self.assertEqual(client.name, "GET")
519+
self.assertEqual(client.kind, SpanKind.CLIENT)
520+
self.assertSpanHasAttributes(
521+
client,
522+
{
523+
SpanAttributes.HTTP_URL: "http://localhost:5000/status/200",
524+
SpanAttributes.HTTP_METHOD: "GET",
525+
SpanAttributes.HTTP_STATUS_CODE: 200,
526+
},
527+
)
528528

529529
# self.memory_exporter.clear()
530530

0 commit comments

Comments
 (0)