Skip to content

Commit

Permalink
Skip database isolation case for task mapping taskinstance tests (apa…
Browse files Browse the repository at this point in the history
…che#41471)

Related: apache#41067
(cherry picked from commit 7718bd7)
  • Loading branch information
potiuk authored and utkarsharma2 committed Aug 21, 2024
1 parent 3b09b27 commit 15bb0aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/models/test_taskinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,10 @@ def test_check_task_dependencies(
# 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",
[
Expand Down Expand Up @@ -1540,6 +1543,7 @@ def do_something_else(i):
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)
Expand Down

0 comments on commit 15bb0aa

Please sign in to comment.