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 c9b04385ea8 fix test_execution flaky test (#60879)
c9b04385ea8 is described below

commit c9b04385ea8deaf810812de6bb9bd4064122b362
Author: Henry Chen <[email protected]>
AuthorDate: Tue Jan 27 19:43:51 2026 +0800

    fix test_execution flaky test (#60879)
---
 airflow-core/tests/unit/executors/test_local_executor.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/airflow-core/tests/unit/executors/test_local_executor.py 
b/airflow-core/tests/unit/executors/test_local_executor.py
index fb93a699fd5..5f216cca2e7 100644
--- a/airflow-core/tests/unit/executors/test_local_executor.py
+++ b/airflow-core/tests/unit/executors/test_local_executor.py
@@ -78,7 +78,6 @@ class TestLocalExecutor:
 
         executor.end()
 
-    @skip_spawn_mp_start
     @mock.patch("airflow.sdk.execution_time.supervisor.supervise")
     def test_execution(self, mock_supervise):
         success_tis = [
@@ -101,8 +100,12 @@ class TestLocalExecutor:
         fail_ti = success_tis[0].model_copy(update={"id": uuid7(), "task_id": 
"failure"})
 
         # We just mock both styles here, only one will be hit though
+        has_failed_once = False
+
         def fake_supervise(ti, **kwargs):
-            if ti.id == fail_ti.id:
+            nonlocal has_failed_once
+            if ti.id == fail_ti.id and not has_failed_once:
+                has_failed_once = True
                 raise RuntimeError("fake failure")
             return 0
 

Reply via email to