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

potiuk 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 99883535ae1 Fix Connection test failures due to Fernet key caching 
(#58137)
99883535ae1 is described below

commit 99883535ae12371444ea46887f5f9e5effd0cd4f
Author: Ankit Chaurasia <[email protected]>
AuthorDate: Mon Nov 10 22:01:58 2025 +0545

    Fix Connection test failures due to Fernet key caching (#58137)
---
 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 d39f3339b99..947c5469e37 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",

Reply via email to