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



##########
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:
       Does this test really check the code path you think it does? i.e. 
without your change does this throw the (now deleted) SerializedDagNotFound 
error?




-- 
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]


Reply via email to