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 35e087691b9 Fix flaky test_run_no_log in DbApiHook by verifying caplog
text instead of length. (#63860)
35e087691b9 is described below
commit 35e087691b937ea1351163efcac4a48e6ec099c8
Author: Henry Chen <[email protected]>
AuthorDate: Sat Mar 21 01:28:21 2026 +0800
Fix flaky test_run_no_log in DbApiHook by verifying caplog text instead of
length. (#63860)
---
providers/common/sql/tests/unit/common/sql/hooks/test_dbapi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/providers/common/sql/tests/unit/common/sql/hooks/test_dbapi.py
b/providers/common/sql/tests/unit/common/sql/hooks/test_dbapi.py
index 8c187c43028..24832deff22 100644
--- a/providers/common/sql/tests/unit/common/sql/hooks/test_dbapi.py
+++ b/providers/common/sql/tests/unit/common/sql/hooks/test_dbapi.py
@@ -539,7 +539,7 @@ class TestDbApiHook:
statement = "SQL"
caplog.clear()
self.db_hook_no_log_sql.run(statement)
- assert len(caplog.messages) in [1, 2]
+ assert "Rows affected: 0" in caplog.text
def test_run_with_handler(self):
sql = "SQL"