ashb commented on code in PR #31061:
URL: https://github.com/apache/airflow/pull/31061#discussion_r1185045941
##########
tests/dag_processing/test_processor.py:
##########
@@ -917,6 +917,22 @@ def test_dag_parser_output_when_logging_to_file(self,
mock_redirect_stdout_for_f
)
mock_redirect_stdout_for_file.assert_called_once()
+ @mock.patch("airflow.dag_processing.processor.settings.dispose_orm",
MagicMock)
+ def test_no_valueerror_with_parseable_dag_in_zip(self, tmpdir):
+ zip_filename = os.path.join(tmpdir, "test_zip.zip")
+ with ZipFile(zip_filename, "w") as zip_file:
+ zip_file.writestr(TEMP_DAG_FILENAME, PARSEABLE_DAG_FILE_CONTENTS)
+
+ processor = DagFileProcessorProcess(
+ file_path=zip_filename,
+ pickle_dags=False,
+ dag_ids=[],
+ dag_directory=[],
+ callback_requests=[],
+ )
+ processor.start()
+ processor.terminate()
Review Comment:
This will send a SIGTERM to the processor -- meaning it might not actually
test what we want. I think we need to let it run to completion.
--
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]