Skip to content

Commit ed1971f

Browse files
committed
PYTHON-5945 Note which otel tests will be superseded by PYTHON-5947
test_span_created_for_insert_and_find and test_query_text_included_when_configured duplicate coverage the unified test format's find_without_query_text.yml/insert.yml and find.yml will provide once operation-span support and the expectTracingMessages runner land; flag them for removal at that point rather than leaving the redundancy undocumented.
1 parent 8b7479b commit ed1971f

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

test/asynchronous/test_otel.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def spans(self, name: str | None = None):
7474
return list(finished)
7575
return [s for s in finished if s.name == name]
7676

77+
# TODO(PYTHON-5947): once the unified test format runner supports
78+
# expectTracingMessages/operation spans, this is superseded by the spec's
79+
# find_without_query_text.yml and insert.yml.
7780
async def test_span_created_for_insert_and_find(self):
7881
client = await self.async_rs_or_single_client(tracing={"enabled": True})
7982
coll = client[self.db.name].test_otel
@@ -233,6 +236,9 @@ async def test_prose_2_command_payload_emission_via_env_var(self):
233236
self.assertEqual(len(spans), 1)
234237
self.assertNotIn("db.query.text", spans[0].attributes)
235238

239+
# TODO(PYTHON-5947): once the unified test format runner supports
240+
# expectTracingMessages/operation spans, this is superseded by the spec's
241+
# find.yml (db.query.text assertion).
236242
async def test_query_text_included_when_configured(self):
237243
client = await self.async_rs_or_single_client(
238244
tracing={"enabled": True, "query_text_max_length": 1000}

test/test_otel.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def spans(self, name: str | None = None):
7474
return list(finished)
7575
return [s for s in finished if s.name == name]
7676

77+
# TODO(PYTHON-5947): once the unified test format runner supports
78+
# expectTracingMessages/operation spans, this is superseded by the spec's
79+
# find_without_query_text.yml and insert.yml.
7780
def test_span_created_for_insert_and_find(self):
7881
client = self.rs_or_single_client(tracing={"enabled": True})
7982
coll = client[self.db.name].test_otel
@@ -233,6 +236,9 @@ def test_prose_2_command_payload_emission_via_env_var(self):
233236
self.assertEqual(len(spans), 1)
234237
self.assertNotIn("db.query.text", spans[0].attributes)
235238

239+
# TODO(PYTHON-5947): once the unified test format runner supports
240+
# expectTracingMessages/operation spans, this is superseded by the spec's
241+
# find.yml (db.query.text assertion).
236242
def test_query_text_included_when_configured(self):
237243
client = self.rs_or_single_client(tracing={"enabled": True, "query_text_max_length": 1000})
238244
coll = client[self.db.name].test_otel

0 commit comments

Comments
 (0)