LeonardoIshida commented on code in PR #57778:
URL: https://github.com/apache/airflow/pull/57778#discussion_r2501336493


##########
task-sdk/tests/task_sdk/execution_time/test_supervisor.py:
##########
@@ -224,6 +225,46 @@ def test_supervise(
             with expectation:
                 supervise(**kw)
 
+    def test_supervisor_enforces_execution_timeout(self, test_dags_dir, 
captured_logs, client_with_ti_start):
+        """
+        Test that the supervisor enforces execution_timeout and kills the task.
+        """
+        ti = TaskInstance(
+            id=uuid7(),
+            task_id="task_with_timeout",
+            dag_id="timeout_test",
+            run_id="test_run",
+            try_number=1,
+            dag_version_id=uuid7(),
+        )
+
+        bundle_info = BundleInfo(name="my-bundle", version=None)
+
+        start_time = time.time()
+
+        with patch.dict(os.environ, local_dag_bundle_cfg(test_dags_dir, 
bundle_info.name)):
+            exit_code = supervise(
+                ti=ti,
+                dag_rel_path="timeout_test.py",

Review Comment:
   So, I changed it and made a test that does not depends on an external file, 
I think it will be better



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