ephraimbuddy commented on a change in pull request #18554:
URL: https://github.com/apache/airflow/pull/18554#discussion_r717670742



##########
File path: tests/models/test_dagbag.py
##########
@@ -91,6 +91,15 @@ def test_get_non_existing_dag(self):
         non_existing_dag_id = "non_existing_dag_id"
         assert dagbag.get_dag(non_existing_dag_id) is None
 
+    def test_serialized_dag_not_existing_doesnt_raise(self):
+        """
+        test that retrieving a non existing dag id returns None without 
crashing
+        """
+        dagbag = models.DagBag(dag_folder=self.empty_dir, 
include_examples=False, read_dags_from_db=True)
+
+        non_existing_dag_id = "non_existing_dag_id"
+        assert dagbag.get_dag(non_existing_dag_id) is None
+

Review comment:
       Yes. It throws the SerializedDagNotFound error without my change




-- 
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-unsubscr...@airflow.apache.org

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


Reply via email to