This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-1-test by this push:
     new d90550ebf23 Add number of queries guard in public dags list endpoints 
(#57506) (#57556)
d90550ebf23 is described below

commit d90550ebf23104c4a299ed521dfb9b5f3a21841b
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Fri Oct 31 12:55:22 2025 +0100

    Add number of queries guard in public dags list endpoints (#57506) (#57556)
    
    (cherry picked from commit dc73d38a36c9d1e532ee76a990027b5c90dd2166)
---
 .../tests/unit/api_fastapi/core_api/routes/public/test_dags.py       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
index 96fa5e3e673..fad5d39c7d8 100644
--- a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
+++ b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_dags.py
@@ -31,7 +31,7 @@ from airflow.providers.standard.operators.empty import 
EmptyOperator
 from airflow.utils.state import DagRunState, TaskInstanceState
 from airflow.utils.types import DagRunTriggeredByType, DagRunType
 
-from tests_common.test_utils.asserts import count_queries
+from tests_common.test_utils.asserts import assert_queries_count, count_queries
 from tests_common.test_utils.db import (
     clear_db_assets,
     clear_db_connections,
@@ -441,7 +441,8 @@ class TestGetDags(TestDagEndpoint):
         if any(param in query_params for param in ["has_asset_schedule", 
"asset_dependency"]):
             self._create_asset_test_data(session)
 
-        response = test_client.get("/dags", params=query_params)
+        with assert_queries_count(4):
+            response = test_client.get("/dags", params=query_params)
         assert response.status_code == 200
         body = response.json()
 

Reply via email to