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

potiuk pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v2-10-test by this push:
     new 7f49cfc06b Skip database isolation case for task mapping taskinstance 
tests (#41954) (#41954)
7f49cfc06b is described below

commit 7f49cfc06b6e300b64e333b482d6804603fd982f
Author: Utkarsh Sharma <utkarshar...@gmail.com>
AuthorDate: Wed Sep 4 01:06:09 2024 +0530

    Skip database isolation case for task mapping taskinstance tests (#41954) 
(#41954)
    
    * Simpler task retrieval for taskinstance test (#41389)
    
    The test has been updated for DB isolation but the retrieval of
    task was not intuitive and it could lead to flaky tests possibly
    
    (cherry picked from commit f25adf14ad486bac818fe3fdcd61eb3355e8ec9b)
    
    * Skip  database isolation case for task mapping taskinstance tests (#41471)
    
    Related: #41067
    (cherry picked from commit 7718bd7a6ed7fb476e4920315b6d11f1ac465f44)
    
    ---------
    
    Co-authored-by: Jarek Potiuk <ja...@potiuk.com>
    Co-authored-by: Tzu-ping Chung <uranu...@gmail.com>
---
 tests/models/test_taskinstance.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/models/test_taskinstance.py 
b/tests/models/test_taskinstance.py
index fbbf175ddd..cbd38e9b39 100644
--- a/tests/models/test_taskinstance.py
+++ b/tests/models/test_taskinstance.py
@@ -1444,7 +1444,10 @@ class TestTaskInstance:
     # Parameterized tests to check for the correct firing
     # of the trigger_rule under various circumstances of mapped task
     # Numeric fields are in order:
-    #   successes, skipped, failed, upstream_failed, done,removed
+    #   successes, skipped, failed, upstream_failed, done,remove
+    # Does not work for database isolation mode because there is local test 
monkeypatching of upstream_failed
+    # That never gets propagated to internal_api
+    @pytest.mark.skip_if_database_isolation_mode
     @pytest.mark.parametrize(
         "trigger_rule, upstream_states, flag_upstream_failed, expect_state, 
expect_completed",
         [
@@ -1541,6 +1544,7 @@ class TestTaskInstance:
         ti = dr.get_task_instance("do_something_else", session=session)
         ti.map_index = 0
         base_task = ti.task
+
         for map_index in range(1, 5):
             ti = TaskInstance(base_task, run_id=dr.run_id, map_index=map_index)
             session.add(ti)

Reply via email to