dstandish commented on a change in pull request #19194:
URL: https://github.com/apache/airflow/pull/19194#discussion_r774797017
##########
File path: tests/models/test_taskinstance.py
##########
@@ -483,50 +483,32 @@ def task_function(ti):
ti.state == state
@pytest.mark.parametrize(
- "state",
- [State.FAILED, State.SKIPPED, State.SUCCESS, State.UP_FOR_RESCHEDULE,
State.UP_FOR_RETRY],
+ "state, exception_type, retries",
+ [
+ (State.FAILED, AirflowException, 0),
+ (State.SKIPPED, AirflowSkipException, 0),
+ (State.SUCCESS, None, 0),
+ (State.UP_FOR_RESCHEDULE,
AirflowRescheduleException(timezone.utcnow()), 0),
+ (State.UP_FOR_RETRY, AirflowException, 1),
+ ],
)
- def test_task_wipes_next_fields(self, session, state, dag_maker):
+ def test_task_wipes_next_fields(self, session, dag_maker, state,
exception_type, retries):
"""
- Test that ensures that tasks wipe their next_method and next_kwargs
- when they go into a state of FAILED, SKIPPED, SUCCESS,
UP_FOR_RESCHEDULE, or UP_FOR_RETRY.
+ Test that ensures that tasks wipe their next_method and next_kwargs
for the configured states:
Review comment:
```suggestion
Test that ensures that tasks wipe their next_method and next_kwargs
when the TI enters one of the following states:
```
--
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]