You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/04/26 10:59:03 UTC

[GitHub] [airflow] ashb commented on a change in pull request #5182: [AIRFLOW-4361] Fix flaky test_integration_run_dag_with_scheduler_failure

ashb commented on a change in pull request #5182:  [AIRFLOW-4361] Fix flaky test_integration_run_dag_with_scheduler_failure
URL: https://github.com/apache/airflow/pull/5182#discussion_r278901841
 
 

 ##########
 File path: tests/contrib/minikube/test_kubernetes_executor.py
 ##########
 @@ -65,8 +65,27 @@ def _get_session_with_retries(self):
         session.mount('https://', HTTPAdapter(max_retries=retries))
         return session
 
+    def _ensure_airflow_webserver_is_healthy(self):
+        http_codes = []
+        for _ in range(0, 10):
+            result = self.session.get(
+                "http://{host}/health".format(host=get_minikube_host()))
+            http_codes.append(result.status_code)
+            if result.status_code == 200:
+                break
+            time.sleep(4)
+
+        self.assertTrue(
+            200 in http_codes,
+            ("Airflow webserver is not healthy. "
+             "Got the following http codes: {}").format(http_codes)
+        )
+
     def setUp(self):
         self.session = self._get_session_with_retries()
+        output = check_output(['kubectl', 'get', 'pods']).decode()
+        print('Active k8s pods:\n{}'.format(output))
 
 Review comment:
   This will produce a lot of "spam" in the logs and I don't think we should print this unless there is a problem.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services