You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ta...@apache.org on 2024/05/23 09:42:41 UTC
(airflow) branch main updated: Mark `TestStandardTaskRunner::test_read_task_utilization` as db test (#39776)
This is an automated email from the ASF dual-hosted git repository.
taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new abd85a993b Mark `TestStandardTaskRunner::test_read_task_utilization` as db test (#39776)
abd85a993b is described below
commit abd85a993b63714dd3d8c17221341a6c1eb36f51
Author: Andrey Anshin <An...@taragol.is>
AuthorDate: Thu May 23 13:42:33 2024 +0400
Mark `TestStandardTaskRunner::test_read_task_utilization` as db test (#39776)
---
tests/task/task_runner/test_standard_task_runner.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/task/task_runner/test_standard_task_runner.py b/tests/task/task_runner/test_standard_task_runner.py
index 381aefc7c1..d163008961 100644
--- a/tests/task/task_runner/test_standard_task_runner.py
+++ b/tests/task/task_runner/test_standard_task_runner.py
@@ -449,10 +449,11 @@ class TestStandardTaskRunner:
"_AIRFLOW_PARSING_CONTEXT_TASK_ID=task1\n"
)
+ @pytest.mark.db_test
@mock.patch("airflow.task.task_runner.standard_task_runner.Stats.gauge")
@patch("airflow.utils.log.file_task_handler.FileTaskHandler._init_file")
- def test_read_task_utilization(self, mock_init, mock_stats):
- mock_init.return_value = "/tmp/any"
+ def test_read_task_utilization(self, mock_init, mock_stats, tmp_path):
+ mock_init.return_value = (tmp_path / "test_read_task_utilization.log").as_posix()
Job = mock.Mock()
Job.job_type = None
Job.task_instance = mock.MagicMock()