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 9d027482c5b Fix flaky test_plugins_manager tests due to OTel exporter 
logs (#63309)
9d027482c5b is described below

commit 9d027482c5bb0a384ff289918be6d1d30a37b907
Author: Jarek Potiuk <[email protected]>
AuthorDate: Wed Mar 11 00:44:18 2026 +0100

    Fix flaky test_plugins_manager tests due to OTel exporter logs (#63309)
    
    The `test_no_log_when_no_plugins` and `test_loads_filesystem_plugins`
    tests assert `caplog.record_tuples == []` but intermittently fail when
    OpenTelemetry's BatchSpanProcessor tries to export spans to
    localhost:4318 (no collector running) and logs transient connection
    error warnings. Filter out opentelemetry.* log records from the
    assertion since they are infrastructure noise unrelated to plugin
    loading behavior.
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
---
 airflow-core/tests/unit/plugins/test_plugins_manager.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow-core/tests/unit/plugins/test_plugins_manager.py 
b/airflow-core/tests/unit/plugins/test_plugins_manager.py
index 10377fbb4ed..8784c82a5cb 100644
--- a/airflow-core/tests/unit/plugins/test_plugins_manager.py
+++ b/airflow-core/tests/unit/plugins/test_plugins_manager.py
@@ -84,7 +84,7 @@ class TestPluginsManager:
 
             plugins_manager.ensure_plugins_loaded()
 
-        assert caplog.record_tuples == []
+        assert [r for r in caplog.record_tuples if not 
r[0].startswith("opentelemetry.")] == []
 
     def test_loads_filesystem_plugins(self, caplog):
         from airflow import plugins_manager
@@ -104,7 +104,7 @@ class TestPluginsManager:
         else:
             pytest.fail("Wasn't able to find a registered 
`AirflowTestOnLoadPlugin`")
 
-        assert caplog.record_tuples == []
+        assert [r for r in caplog.record_tuples if not 
r[0].startswith("opentelemetry.")] == []
 
     def test_loads_filesystem_plugins_exception(self, caplog, tmp_path):
         from airflow import plugins_manager

Reply via email to