You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/05 13:19:19 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #22641: Disable SLAs for mapped operators

ashb commented on code in PR #22641:
URL: https://github.com/apache/airflow/pull/22641#discussion_r842775614


##########
tests/jobs/test_scheduler_job.py:
##########
@@ -3812,6 +3812,20 @@ def test_mapped_dag(self, dag_id, session):
         dr.refresh_from_db(session)
         assert dr.state == DagRunState.SUCCESS
 
+    @pytest.mark.long_running
+    @pytest.mark.xfail(reason="Taskflow mapped tasks don't take default_args yet")
+    @pytest.mark.parametrize(
+        "dag_id", ["test_mapped_slas_disabled_classic", "test_mapped_slas_disabled_taskflow"]
+    )
+    def test_mapped_dag_slas_disabled(self, dag_id, session):
+
+        dag_file = TEST_DAGS_FOLDER / f'{dag_id}.py'
+        self.dagbag.process_file(str(dag_file))

Review Comment:
   This doesn't need to be in the scheduler job to test it -- we can make this a test that the exception is thrown in tests/models/test_baseopeator.py.
   
   Specifically we don't to add new test files (which can bet loaded by other tests slowing them down) nor do we need to check it makes it in to the import_errors -- that behaviour is already tested elsewhere. 



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org