Repository: incubator-airflow Updated Branches: refs/heads/master 8a2cd08ce -> 02889ce0f
[AIRFLOW-2481] Fix flaky Kubernetes test The test does not have enough time to finish. Therefore simplify the dag a bit to let the test execute more quickly, and give it a bit more time. Closes #3371 from Fokko/AIRFLOW-2481-flaky-kub Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/02889ce0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/02889ce0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/02889ce0 Branch: refs/heads/master Commit: 02889ce0f389293815b14c573525faf3ade193cc Parents: 8a2cd08 Author: Fokko Driesprong <[email protected]> Authored: Sat May 19 00:40:24 2018 +0200 Committer: Fokko Driesprong <[email protected]> Committed: Sat May 19 00:40:24 2018 +0200 ---------------------------------------------------------------------- airflow/example_dags/example_python_operator.py | 8 ++++---- tests/contrib/minikube/test_kubernetes_executor.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/02889ce0/airflow/example_dags/example_python_operator.py ---------------------------------------------------------------------- diff --git a/airflow/example_dags/example_python_operator.py b/airflow/example_dags/example_python_operator.py index 9748e3d..2825eda 100644 --- a/airflow/example_dags/example_python_operator.py +++ b/airflow/example_dags/example_python_operator.py @@ -7,9 +7,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -51,8 +51,8 @@ run_this = PythonOperator( python_callable=print_context, dag=dag) -# Generate 10 sleeping tasks, sleeping from 0 to 9 seconds respectively -for i in range(10): +# Generate 10 sleeping tasks, sleeping from 0 to 4 seconds respectively +for i in range(5): task = PythonOperator( task_id='sleep_for_' + str(i), python_callable=my_sleeping_function, http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/02889ce0/tests/contrib/minikube/test_kubernetes_executor.py ---------------------------------------------------------------------- diff --git a/tests/contrib/minikube/test_kubernetes_executor.py b/tests/contrib/minikube/test_kubernetes_executor.py index 5c4617f..fe38efb 100644 --- a/tests/contrib/minikube/test_kubernetes_executor.py +++ b/tests/contrib/minikube/test_kubernetes_executor.py @@ -188,7 +188,7 @@ class KubernetesExecutorTest(unittest.TestCase): execution_date=execution_date, dag_id='example_python_operator', task_id='print_the_context', - expected_final_state='success', timeout=100) + expected_final_state='success', timeout=120) self.ensure_dag_expected_state(host=host, execution_date=execution_date,
