Lee-W commented on code in PR #39295:
URL: https://github.com/apache/airflow/pull/39295#discussion_r1597920077


##########
tests/providers/databricks/operators/test_databricks.py:
##########
@@ -1865,6 +1865,46 @@ def test_execute_without_wait_for_termination(self):
         operator.launch_notebook_job.assert_called_once()
         operator.monitor_databricks_job.assert_not_called()
 
+    
@mock.patch("airflow.providers.databricks.operators.databricks.DatabricksHook")
+    def test_execute_with_deferrable(self, mock_databricks_hook):
+        mock_databricks_hook.return_value.get_run.return_value = {"state": 
{"life_cycle_state": "PENDING"}}
+        operator = DatabricksNotebookOperator(
+            task_id="test_task",
+            notebook_path="test_path",
+            source="test_source",
+            databricks_conn_id="test_conn_id",
+            wait_for_termination=True,
+            deferrable=True,
+        )
+        operator.databricks_run_id = 12345
+
+        with pytest.raises(TaskDeferred):

Review Comment:
   
https://github.com/apache/airflow/blob/79042cff416296c8bdbd64f2e0a5f4d46c93e882/tests/providers/http/operators/test_http.py#L98
   
   let's extend the test like this one



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