Channels
ask-ai
dagster-de
topic-async-execution
dagster-jp
dagster-cube
gigs-freelance
dagster-wandb
dagster-feedback
dagster-machine-learning
dagster-bigquery
dagster-university
dagster-support
dagster-dask
dagster-snowflake
dagster-releases
dagster-dbt
faq-read-me-before-posting
tools
dagster-insights
dagster-pipes
project-flexible-range-backfills
data-platform-design
events
dagster-serverless
dagster-noteable
introductions
dagster-airflow
dagster-cloud
random
dagster-airbyte
dagster-spatial
announcements
github-discussions
豆瓣酱帮
dagstereo
dagster-ecs
dagster-kubernetes
jobs
dagster-showcase
data-quality-asset-checks
Powered by
#dagster-support
Title
# dagster-support
v
Vignesh M
04/11/2022, 8:25 AM
Hi Team, I wanted to test the failure sensor of dagster from pytest. I am able to test success sensor, but not able to simulate a pipeline failure and get its dagster run and context objects. Any approach on how to do this?
s
Stefan Adelbert
04/11/2022, 9:20 AM
Hi
@Vignesh M
You could create a job in your test suite which has s single op which raises an exception. You could then run that job and retrieve its failure event and use it to exercise your failure sensor. See the documentation here for details,
https://docs.dagster.io/concepts/partitions-schedules-sensors/sensors#testing-run-status-sensors
.
👍 1
v
Vignesh M
04/11/2022, 9:39 AM
ok, thanks, i had to use raise_on_error=False
🎉 1
3 Views
Post