diff --git a/airflow-core/tests/unit/dag_processing/test_manager.py b/airflow-core/tests/unit/dag_processing/test_manager.py index cbd13f4aaa397..0d48f7b1626b0 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 @@ def test_scan_stale_dags(self, testing_dag_bundle): 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