amoghrajesh commented on code in PR #44241:
URL: https://github.com/apache/airflow/pull/44241#discussion_r1857893672


##########
tests/api_fastapi/execution_api/routes/test_task_instances.py:
##########
@@ -193,6 +195,50 @@ def test_ti_update_state_database_error(self, client, 
session, create_task_insta
             assert response.status_code == 500
             assert response.json()["detail"] == "Database error occurred"
 
+    def test_ti_update_state_to_deferred(self, client, session, 
create_task_instance):
+        """
+        Test that tests if the transition to deferred state is handled 
correctly.
+        """
+        clear_db_runs()
+
+        ti = create_task_instance(
+            task_id="test_ti_update_state_to_deferred",
+            state=State.RUNNING,
+            session=session,
+        )
+        session.commit()
+
+        payload = {
+            "state": "deferred",
+            "classpath": "my-class-path",
+            "kwargs": {},
+            "created_date": "2024-10-31T12:00:00Z",

Review Comment:
   As per kaxil's comment below, removed this logic



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