uranusjr commented on code in PR #23929:
URL: https://github.com/apache/airflow/pull/23929#discussion_r883309926
##########
tests/models/test_cleartasks.py:
##########
@@ -106,6 +106,29 @@ def test_clear_task_instances_external_executor_id(self,
dag_maker):
assert ti0.state is None
assert ti0.external_executor_id is None
+ def test_clear_task_instances_next_method(self, dag_maker, session):
+ with dag_maker(
+ 'test_clear_task_instances_next_method',
+ start_date=DEFAULT_DATE,
+ end_date=DEFAULT_DATE + datetime.timedelta(days=10),
+ ) as dag:
+ EmptyOperator(task_id='task0')
+
+ ti0 = dag_maker.create_dagrun().task_instances[0]
+ ti0.state = State.DEFERRED
+ ti0.next_method = "next_method"
+ ti0.next_kwargs = {}
+
+ session.add(ti0)
+ session.commit()
Review Comment:
Would `flush` be enough here?
--
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]