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

amoghdesai 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 74ea291283b Fix Connection test failures due to Fernet key caching 
(#58034)
74ea291283b is described below

commit 74ea291283bfe41118d988f2a5d53325b33dead4
Author: Ankit Chaurasia <[email protected]>
AuthorDate: Fri Nov 7 17:59:13 2025 +0545

    Fix Connection test failures due to Fernet key caching (#58034)
---
 airflow-core/tests/unit/models/test_connection.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/airflow-core/tests/unit/models/test_connection.py 
b/airflow-core/tests/unit/models/test_connection.py
index 63c9aac660d..93779a1bc5e 100644
--- a/airflow-core/tests/unit/models/test_connection.py
+++ b/airflow-core/tests/unit/models/test_connection.py
@@ -38,6 +38,15 @@ if TYPE_CHECKING:
 
 
 class TestConnection:
+    @pytest.fixture(autouse=True)
+    def clear_fernet_cache(self):
+        """Clear the fernet cache before each test to avoid encryption 
issues."""
+        from airflow.models.crypto import get_fernet
+
+        get_fernet.cache_clear()
+        yield
+        get_fernet.cache_clear()
+
     @pytest.mark.parametrize(
         "uri, expected_conn_type, expected_host, expected_login, 
expected_password,"
         " expected_port, expected_schema, expected_extra_dict, 
expected_exception_message",

Reply via email to