vatsrahul1001 commented on code in PR #46232:
URL: https://github.com/apache/airflow/pull/46232#discussion_r1940461531
##########
tests/models/test_dagrun.py:
##########
@@ -351,10 +351,11 @@ def test_dagrun_no_deadlock_with_depends_on_past(self,
dag_maker, session):
run_id="test_dagrun_no_deadlock_1",
start_date=DEFAULT_DATE,
)
- dr2 = dag_maker.create_dagrun_after(
- dr,
+ next_date = DEFAULT_DATE + datetime.timedelta(days=1)
+ dr2 = dag_maker.create_dagrun(
run_id="test_dagrun_no_deadlock_2",
start_date=DEFAULT_DATE + datetime.timedelta(days=1),
+ logical_date=next_date,
)
Review Comment:
@uranusjr When we pass the `dr` object to create_dagrun_after, it fails with
a unique constraint error on the dag_run table. In dag_maker, we set
logical_date to start_date if it's None
[here](https://github.com/apache/airflow/blob/main/tests_common/pytest_plugin.py#L906),
and we are passing the same logical_date in create_dagrun_after due to which
it fails.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]