dstandish commented on code in PR #67659:
URL: https://github.com/apache/airflow/pull/67659#discussion_r3639152552


##########
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:
##########
@@ -5813,6 +5814,155 @@ def test_no_task_execute_span_at_detail_level_1(self):
         assert "task.execute" not in names
 
 
+class TestCallbackSpans:
+    """Tests for spans emitted around task callback / pre-post-execute 
invocations."""
+
+    @pytest.fixture(autouse=True)
+    def _sampled_carrier_provider(self):
+        """Make new_dagrun_trace_carrier produce a SAMPLED carrier (see 
TestDetailSpan)."""
+        provider = TracerProvider()
+        with mock.patch(
+            "airflow._shared.observability.traces.trace.get_tracer_provider",
+            return_value=provider,
+        ):
+            yield

Review Comment:
   i consolidated the fixture



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to