From c1eec2b62b5c419cf681e22bf4ee4b5656423e95 Mon Sep 17 00:00:00 2001 From: afabiani Date: Thu, 4 Apr 2019 13:57:26 +0200 Subject: [PATCH] [Fixes #4322] SESSION_EXPIRED_CONTROL_ENABLE=True breaks GeoNode --- .travis.yml | 12 ++++++------ geonode/settings.py | 2 +- geonode/tests/integration.py | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66e656eaa88..22139a6578a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ matrix: ON_TRAVIS: 'True' TEST_RUN_CORE: 'True' MONITORING_ENABLED: 'False' - SESSION_EXPIRED_CONTROL_ENABLED: 'False' + SESSION_EXPIRED_CONTROL_ENABLED: 'True' - name: "GeoServer-backend Contrib Apps Smoke Tests" python: 2.7 virtualenv: @@ -81,7 +81,7 @@ matrix: TEST_RUN_INTEGRATION_CSW: 'True' TEST_RUN_INTEGRATION_BDD: 'False' MONITORING_ENABLED: 'False' - SESSION_EXPIRED_CONTROL_ENABLED: 'False' + SESSION_EXPIRED_CONTROL_ENABLED: 'True' CELERY_ALWAYS_EAGER: 'True' - name: "GeoServer-backend Integration BDD Tests" python: 2.7 @@ -98,7 +98,7 @@ matrix: TEST_RUN_INTEGRATION_CSW: 'False' TEST_RUN_INTEGRATION_BDD: 'True' MONITORING_ENABLED: 'False' - SESSION_EXPIRED_CONTROL_ENABLED: 'False' + SESSION_EXPIRED_CONTROL_ENABLED: 'True' CELERY_ALWAYS_EAGER: 'True' - name: "QGis Server-backend Core Modules Smoke Tests" python: 2.7 @@ -117,7 +117,7 @@ matrix: ON_TRAVIS: 'True' TEST_RUN_CORE: 'True' MONITORING_ENABLED: 'False' - SESSION_EXPIRED_CONTROL_ENABLED: 'False' + SESSION_EXPIRED_CONTROL_ENABLED: 'True' CELERY_ALWAYS_EAGER: 'True' - name: "QGis Server-backend Contrib Apps Smoke Tests" python: 2.7 @@ -136,7 +136,7 @@ matrix: ON_TRAVIS: 'True' TEST_RUN_INTERNAL_APPS: 'True' MONITORING_ENABLED: 'False' - SESSION_EXPIRED_CONTROL_ENABLED: 'False' + SESSION_EXPIRED_CONTROL_ENABLED: 'True' CELERY_ALWAYS_EAGER: 'True' - name: "QGis Server-backend Integration Tests" python: 2.7 @@ -155,7 +155,7 @@ matrix: ON_TRAVIS: 'True' TEST_RUN_INTEGRATION: 'True' MONITORING_ENABLED: 'False' - SESSION_EXPIRED_CONTROL_ENABLED: 'False' + SESSION_EXPIRED_CONTROL_ENABLED: 'True' CELERY_ALWAYS_EAGER: 'True' - name: "Selenium Integration Tests" python: 3.5 diff --git a/geonode/settings.py b/geonode/settings.py index 6eb08dfcfde..956403740e0 100644 --- a/geonode/settings.py +++ b/geonode/settings.py @@ -119,7 +119,7 @@ _db_conf = dj_database_url.parse(DATABASE_URL, conn_max_age=600) _db_conf.update({'TIMEOUT': 60}) DATABASES = { - 'default': dj_database_url.parse(DATABASE_URL, conn_max_age=600) + 'default': _db_conf } if os.getenv('DEFAULT_BACKEND_DATASTORE'): diff --git a/geonode/tests/integration.py b/geonode/tests/integration.py index 83f447addcf..f8e2c7909b4 100644 --- a/geonode/tests/integration.py +++ b/geonode/tests/integration.py @@ -190,7 +190,6 @@ def test_layer_upload(self): self.assertEquals(r.status_code, 200) o = json.loads(r.text) self.assertTrue('long-array-array' in o) - self.assertTrue(len(o['long-array-array']) > 0) from geonode.geoserver.helpers import (get_sld_for, fixup_style,