airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joy...@apache.org
Subject [1/2] incubator-airflow git commit: [AIRFLOW-2207] Fix flaky test that uses app.cached_app()
Date Mon, 12 Mar 2018 18:05:11 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master 64100d2a2 -> a4aa46e41


[AIRFLOW-2207] Fix flaky test that uses app.cached_app()

tests.www.test_views:TestMountPoint.test_mount changes base_url
then calls airflow.www.app.cached_app().
But if another test calls app.cached_app() first without changing
base_url, succeeding test_mount fails on Travis.
So test_mount should clear cached app for itself in its setup method
so as to remount base_url forcefully.


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/7ab53e6f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/7ab53e6f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/7ab53e6f

Branch: refs/heads/master
Commit: 7ab53e6f3d12d36a9828ad6facc25598652b1023
Parents: c6bdaf8
Author: Kengo Seki <sekikn@apache.org>
Authored: Mon Mar 12 09:08:44 2018 -0400
Committer: Kengo Seki <sekikn@apache.org>
Committed: Mon Mar 12 10:44:30 2018 -0400

----------------------------------------------------------------------
 tests/www/test_views.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/7ab53e6f/tests/www/test_views.py
----------------------------------------------------------------------
diff --git a/tests/www/test_views.py b/tests/www/test_views.py
index 2548516..9461f9f 100644
--- a/tests/www/test_views.py
+++ b/tests/www/test_views.py
@@ -453,6 +453,8 @@ class TestMountPoint(unittest.TestCase):
         configuration.conf.set("webserver", "base_url", "http://localhost:8080/test")
         config = dict()
         config['WTF_CSRF_METHODS'] = []
+        # Clear cached app to remount base_url forcefully
+        application.app = None
         app = application.cached_app(config=config, testing=True)
         self.client = Client(app)
 


Mime
View raw message