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

pierrejeambrun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 19d4e6ac5f3 Add number of queries guard in public connection list 
endpoints (#57442)
19d4e6ac5f3 is described below

commit 19d4e6ac5f3a896e5a25092a7288640464776f16
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Wed Oct 29 13:54:25 2025 +0100

    Add number of queries guard in public connection list endpoints (#57442)
---
 .../unit/api_fastapi/core_api/routes/public/test_connections.py     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py
 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py
index 76224542a2b..ff1048efcce 100644
--- 
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py
+++ 
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_connections.py
@@ -27,6 +27,7 @@ from airflow.secrets.environment_variables import 
CONN_ENV_PREFIX
 from airflow.utils.session import provide_session
 
 from tests_common.test_utils.api_fastapi import _check_last_log
+from tests_common.test_utils.asserts import assert_queries_count
 from tests_common.test_utils.db import clear_db_connections, clear_db_logs, 
clear_test_connections
 from tests_common.test_utils.markers import 
skip_if_force_lowest_dependencies_marker
 
@@ -217,7 +218,10 @@ class TestGetConnections(TestConnectionEndpoint):
         self, test_client, session, query_params, expected_total_entries, 
expected_ids
     ):
         self.create_connections()
-        response = test_client.get("/connections", params=query_params)
+
+        with assert_queries_count(3):
+            response = test_client.get("/connections", params=query_params)
+
         assert response.status_code == 200
 
         body = response.json()

Reply via email to