This is an automated email from the ASF dual-hosted git repository. amoghdesai pushed a commit to branch backport-28278de-v3-0-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit b96a31e2f69e903dacfa959fb3c6b63dcee3ea76 Author: Amogh Desai <[email protected]> AuthorDate: Tue Aug 19 15:38:03 2025 +0530 [v3-0-test] Fix flaky timeout test by using relative start_time calculation (#54641) (cherry picked from commit 28278debebabdd44bf69609f17d2c7c9c8a39695) Co-authored-by: Amogh Desai <[email protected]> --- airflow-core/tests/unit/dag_processing/test_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow-core/tests/unit/dag_processing/test_manager.py b/airflow-core/tests/unit/dag_processing/test_manager.py index cbd13f4aaa3..0d48f7b1626 100644 --- a/airflow-core/tests/unit/dag_processing/test_manager.py +++ b/airflow-core/tests/unit/dag_processing/test_manager.py @@ -520,7 +520,9 @@ class TestDagFileProcessorManager: def test_kill_timed_out_processors_kill(self): manager = DagFileProcessorManager(max_runs=1, processor_timeout=5) - processor, _ = self.mock_processor(start_time=16000) + # Set start_time to ensure timeout occurs: start_time = current_time - (timeout + 1) = always (timeout + 1) seconds + start_time = time.monotonic() - manager.processor_timeout - 1 + processor, _ = self.mock_processor(start_time=start_time) manager._processors = { DagFileInfo( bundle_name="testing", rel_path=Path("abc.txt"), bundle_path=TEST_DAGS_FOLDER
