self, mock_isfile, mock_find_path, mock_might_contain_dag, mock_zipfile
    ):
        """Test files are randomly sorted and seeded by host name"""
        dag_files = ["file_3.py", "file_2.py", "file_4.py", "file_1.py"]
        mock_find_path.return_value = dag_files
        manager = DagFileProcessorManager(
            dag_directory="directory",
            max_runs=1,
            processor_timeout=timedelta(days=365),
            signal_conn=MagicMock(),
            dag_ids=[],
            pickle_dags=False,
            async_mode=True,
        )
        manager.set_file_paths(dag_files)
        assert manager._file_path_queue == collections.deque()
        manager.prepare_file_path_queue()
        expected_order = collections.deque(dag_files)
        random.Random(get_hostname()).shuffle(expected_order)
        assert manager._file_path_queue == expected_order
        
        manager._file_paths = []
        manager.prepare_file_path_queue()
        assert manager._file_path_queue == expected_order
    @conf_vars({("scheduler", "file_parsing_sort_mode"): "modified_time"})
    @mock.patch("zipfile.is_zipfile", return_value=True)
    @mock.patch("airflow.utils.file.might_contain_dag", return_value=True)
    @mock.patch("airflow.utils.file.find_path_from_directory", return_value=True)
    @mock.patch("airflow.utils.file.os.path.isfile", return_value=True)
    @mock.patch("airflow.utils.file.os.path.getmtime")