Differential D8231 Diff 39295 python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_executor_definition.py
Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_executor_definition.py
Show First 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | with instance_for_test() as instance: | ||||
@pipeline(mode_defs=[ModeDefinition(executor_defs=[executor_failing])]) | @pipeline(mode_defs=[ModeDefinition(executor_defs=[executor_failing])]) | ||||
def pipeline_executor_failing(): | def pipeline_executor_failing(): | ||||
pass | pass | ||||
result = execute_pipeline( | result = execute_pipeline( | ||||
pipeline_executor_failing, instance=instance, raise_on_error=False | pipeline_executor_failing, instance=instance, raise_on_error=False | ||||
) | ) | ||||
assert not result.success | assert not result.success | ||||
assert result.event_list[-1].event_type == DagsterEventType.PIPELINE_INIT_FAILURE | assert result.event_list[-1].event_type == DagsterEventType.PIPELINE_FAILURE | ||||
# Ensure that error in executor fn is properly persisted. | # Ensure that error in executor fn is properly persisted. | ||||
event_records = instance.all_logs(result.run_id) | event_records = instance.all_logs(result.run_id) | ||||
assert len(event_records) == 1 | assert len(event_records) == 1 | ||||
assert event_records[0].dagster_event_type == DagsterEventType.PIPELINE_INIT_FAILURE | assert event_records[0].dagster_event_type == DagsterEventType.PIPELINE_FAILURE |