ColtenOuO commented on code in PR #72296:
URL: https://github.com/apache/airflow/pull/72296#discussion_r3971006727
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py:
##########
@@ -863,6 +879,53 @@ def test_get_dags_no_n_plus_one_queries(self, session,
test_client):
f"({first_query_count} → {second_query_count}), suggesting n+1
queries for tags"
)
+ def test_get_dags_includes_dag_with_deadline(self, dag_maker, test_client,
session):
+ deadline_dag_id = "test_dag_with_deadline"
+ with dag_maker(
+ deadline_dag_id,
+ schedule=None,
+ start_date=DAG1_START_DATE,
+ deadline=DeadlineAlert(
+ reference=DeadlineReference.DAGRUN_LOGICAL_DATE,
+ interval=timedelta(hours=1),
+ callback=_deadline_callback(),
+ ),
+ ):
+ EmptyOperator(task_id="task1")
+ dag_maker.sync_dagbag_to_db()
+
+ response = test_client.get("/dags")
Review Comment:
Thanks for pointing that out.
I only just realized the test wasn't actually covering the deadline at all :O
I've updated it now!
--
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]