kacpermuda commented on code in PR #36067:
URL: https://github.com/apache/airflow/pull/36067#discussion_r1415788165


##########
tests/providers/openlineage/plugins/test_openlineage_adapter.py:
##########
@@ -240,6 +389,63 @@ def test_emit_failed_event(mock_stats_incr, 
mock_stats_timer):
     mock_stats_timer.assert_called_with("ol.emit.attempts")
 
 
[email protected]("airflow.providers.openlineage.plugins.adapter.Stats.timer")
[email protected]("airflow.providers.openlineage.plugins.adapter.Stats.incr")
+def test_emit_failed_event_with_additional_information(mock_stats_incr, 
mock_stats_timer):
+    client = MagicMock()
+    adapter = OpenLineageAdapter(client)
+
+    run_id = str(uuid.uuid4())
+    event_time = datetime.datetime.now().isoformat()
+    adapter.fail_task(
+        run_id=run_id,
+        end_time=event_time,
+        parent_job_name="parent_job_name",
+        parent_run_id="parent_run_id",
+        job_name="job",
+        task=OperatorLineage(
+            inputs=[Dataset(namespace="bigquery", name="a.b.c"), 
Dataset(namespace="bigquery", name="x.y.z")],
+            outputs=[Dataset(namespace="gs://bucket", name="exported_folder")],
+            run_facets={"sql1": SqlJobFacet(query="SELECT 1;")},

Review Comment:
   Updated.



-- 
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