From 82eef2e7b27c2bd0d68d945772dab2d1040dda8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Thu, 12 Nov 2020 14:40:48 +0100 Subject: [PATCH] Fix - TestSchedulerJobQueriesCount::test_process_dags_queries_count (#12273) --- tests/jobs/test_scheduler_job.py | 56 +++++++++++++++----------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/tests/jobs/test_scheduler_job.py b/tests/jobs/test_scheduler_job.py index b4ac72034936e..d4786c4c43d93 100644 --- a/tests/jobs/test_scheduler_job.py +++ b/tests/jobs/test_scheduler_job.py @@ -3746,35 +3746,35 @@ def test_execute_queries_count_with_harvested_dags(self, expected_query_count, d # pylint: disable=bad-whitespace # expected, dag_count, task_count, start_ago, schedule_interval, shape # One DAG with one task per DAG file - ([10, 10, 10, 10], 1, 1, "1d", "None", "no_structure"), # noqa - ([10, 10, 10, 10], 1, 1, "1d", "None", "linear"), # noqa - ([22, 14, 14, 14], 1, 1, "1d", "@once", "no_structure"), # noqa - ([22, 14, 14, 14], 1, 1, "1d", "@once", "linear"), # noqa - ([22, 24, 27, 30], 1, 1, "1d", "30m", "no_structure"), # noqa - ([22, 24, 27, 30], 1, 1, "1d", "30m", "linear"), # noqa - ([22, 24, 27, 30], 1, 1, "1d", "30m", "binary_tree"), # noqa - ([22, 24, 27, 30], 1, 1, "1d", "30m", "star"), # noqa - ([22, 24, 27, 30], 1, 1, "1d", "30m", "grid"), # noqa + ([8, 8, 8, 8], 1, 1, "1d", "None", "no_structure"), # noqa + ([8, 8, 8, 8], 1, 1, "1d", "None", "linear"), # noqa + ([20, 11, 11, 11], 1, 1, "1d", "@once", "no_structure"), # noqa + ([20, 11, 11, 11], 1, 1, "1d", "@once", "linear"), # noqa + ([20, 21, 23, 25], 1, 1, "1d", "30m", "no_structure"), # noqa + ([20, 21, 23, 25], 1, 1, "1d", "30m", "linear"), # noqa + ([20, 21, 23, 25], 1, 1, "1d", "30m", "binary_tree"), # noqa + ([20, 21, 23, 25], 1, 1, "1d", "30m", "star"), # noqa + ([20, 21, 23, 25], 1, 1, "1d", "30m", "grid"), # noqa # One DAG with five tasks per DAG file - ([10, 10, 10, 10], 1, 5, "1d", "None", "no_structure"), # noqa - ([10, 10, 10, 10], 1, 5, "1d", "None", "linear"), # noqa - ([22, 14, 14, 14], 1, 5, "1d", "@once", "no_structure"), # noqa - ([23, 15, 15, 15], 1, 5, "1d", "@once", "linear"), # noqa - ([22, 24, 27, 30], 1, 5, "1d", "30m", "no_structure"), # noqa - ([23, 26, 30, 34], 1, 5, "1d", "30m", "linear"), # noqa - ([23, 26, 30, 34], 1, 5, "1d", "30m", "binary_tree"), # noqa - ([23, 26, 30, 34], 1, 5, "1d", "30m", "star"), # noqa - ([23, 26, 30, 34], 1, 5, "1d", "30m", "grid"), # noqa + ([8, 8, 8, 8], 1, 5, "1d", "None", "no_structure"), # noqa + ([8, 8, 8, 8], 1, 5, "1d", "None", "linear"), # noqa + ([20, 11, 11, 11], 1, 5, "1d", "@once", "no_structure"), # noqa + ([21, 12, 12, 12], 1, 5, "1d", "@once", "linear"), # noqa + ([20, 21, 23, 25], 1, 5, "1d", "30m", "no_structure"), # noqa + ([21, 23, 26, 29], 1, 5, "1d", "30m", "linear"), # noqa + ([21, 23, 26, 29], 1, 5, "1d", "30m", "binary_tree"), # noqa + ([21, 23, 26, 29], 1, 5, "1d", "30m", "star"), # noqa + ([21, 23, 26, 29], 1, 5, "1d", "30m", "grid"), # noqa # 10 DAGs with 10 tasks per DAG file - ([10, 10, 10, 10], 10, 10, "1d", "None", "no_structure"), # noqa - ([10, 10, 10, 10], 10, 10, "1d", "None", "linear"), # noqa - ([85, 38, 38, 38], 10, 10, "1d", "@once", "no_structure"), # noqa - ([95, 51, 51, 51], 10, 10, "1d", "@once", "linear"), # noqa - ([85, 99, 99, 99], 10, 10, "1d", "30m", "no_structure"), # noqa - ([95, 125, 125, 125], 10, 10, "1d", "30m", "linear"), # noqa - ([95, 119, 119, 119], 10, 10, "1d", "30m", "binary_tree"), # noqa - ([95, 119, 119, 119], 10, 10, "1d", "30m", "star"), # noqa - ([95, 119, 119, 119], 10, 10, "1d", "30m", "grid"), # noqa + ([8, 8, 8, 8], 10, 10, "1d", "None", "no_structure"), # noqa + ([8, 8, 8, 8], 10, 10, "1d", "None", "linear"), # noqa + ([83, 26, 26, 26], 10, 10, "1d", "@once", "no_structure"), # noqa + ([93, 39, 39, 39], 10, 10, "1d", "@once", "linear"), # noqa + ([83, 87, 87, 87], 10, 10, "1d", "30m", "no_structure"), # noqa + ([93, 113, 113, 113], 10, 10, "1d", "30m", "linear"), # noqa + ([93, 107, 107, 107], 10, 10, "1d", "30m", "binary_tree"), # noqa + ([93, 107, 107, 107], 10, 10, "1d", "30m", "star"), # noqa + ([93, 107, 107, 107], 10, 10, "1d", "30m", "grid"), # noqa # pylint: enable=bad-whitespace ] ) @@ -3796,8 +3796,6 @@ def test_process_dags_queries_count( ('scheduler', 'use_job_schedule'): 'True', ('core', 'store_serialized_dags'): 'True', } - ), mock.patch.object( - settings, 'STORE_SERIALIZED_DAGS', True ): dagbag = DagBag(dag_folder=ELASTIC_DAG_FILE, include_examples=False)