diff --git a/tests/contrib/dd_trace_api/test_integration.py b/tests/contrib/dd_trace_api/test_integration.py index cd96d51200..9a818d2d1d 100644 --- a/tests/contrib/dd_trace_api/test_integration.py +++ b/tests/contrib/dd_trace_api/test_integration.py @@ -19,6 +19,8 @@ def test_start_span(self): with dd_trace_api.tracer.Tracer().start_span("web.request") as span: assert not isinstance(span, dd_span_class), "Returned span object should be a stub" assert not hasattr(span, "span_id"), "Returned span stub should not support read operations" - span.finish() spans = self.pop_spans() assert len(spans) == 1 + generated_span = spans[0] + assert isinstance(generated_span, dd_span_class), "Generated span is a real span" + assert hasattr(generated_span, "span_id"), "Generated span should support read operations"