From 2c332b224d2ee207e1b273de3b6cfa47d75f1423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1ek?= Date: Mon, 21 Sep 2020 02:14:21 +0200 Subject: [PATCH] update test server timeouts (#3618) * update test server timeouts * fix failing test * retry prepopulate --- .travis.yml | 1 + spec/authoring_spec.ts | 2 +- spec/helpers/fixtures.ts | 4 ++-- spec/helpers/utils.ts | 4 ++-- test-server/docker-compose.yml | 2 +- test-server/gunicorn_config.py | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d90badef9b..89fcc626e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ addons: chrome: stable before_script: + - echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - | if [ "$SKIP_SERVER_INSTALL" != "true" ]; then npm run webdriver-manager diff --git a/spec/authoring_spec.ts b/spec/authoring_spec.ts index 72b0bb4217..6349c9b53d 100644 --- a/spec/authoring_spec.ts +++ b/spec/authoring_spec.ts @@ -499,7 +499,7 @@ describe('authoring', () => { ctrlKey('x'); authoring.save(); authoring.publish(true); - assertToastMsg('error', 'BODY_HTML empty values not allowed'); + assertToastMsg('error', 'BODY HTML empty values not allowed'); }); it('keyboard navigation operations on subject dropdown', () => { diff --git a/spec/helpers/fixtures.ts b/spec/helpers/fixtures.ts index 84ad9dfbd8..ef6f41a8fd 100644 --- a/spec/helpers/fixtures.ts +++ b/spec/helpers/fixtures.ts @@ -5,12 +5,12 @@ export function resetApp(profile, callback) { backendRequest({ uri: '/prepopulate', method: 'POST', - timeout: 40000, + timeout: 30000, json: {profile: profile}, }, (e, r, j) => { browser.params.token = null; callback(e, r, j); - }, 0); + }, 1); } export function post(params, callback) { diff --git a/spec/helpers/utils.ts b/spec/helpers/utils.ts index ca193b40bf..d0630f527e 100644 --- a/spec/helpers/utils.ts +++ b/spec/helpers/utils.ts @@ -159,7 +159,7 @@ export function altKey(key) { } export function assertToastMsg(type: 'info' | 'success' | 'error', msg: string) { - browser.wait(ECE.visibilityOf(element(s([`notification--${type}`], msg)))); + browser.wait(ECE.visibilityOf(element(s([`notification--${type}`], msg))), 2000); } // Don't expect message to appear @@ -170,7 +170,7 @@ export function assertToastMsgNotDisplayed(type, msg) { export function waitForToastMsgDissapear(type, msg) { browser.wait(protractor.ExpectedConditions.invisibilityOf( element(by.cssContainingText(`[data-test-id="notification--${type}"]`, msg)), - )); + ), 3000); } /** diff --git a/test-server/docker-compose.yml b/test-server/docker-compose.yml index 4bef2c05e3..26b4d0a90c 100644 --- a/test-server/docker-compose.yml +++ b/test-server/docker-compose.yml @@ -39,6 +39,6 @@ services: - PUBLICAPI_MONGO_URI=mongodb://mongo/publicapi_e2e - CONTENTAPI_MONGO_URI=mongodb://mongo/contentapi_e2e - WEB_WORKERS=2 - - WEB_TIMEOUT=10 + - WEB_TIMEOUT=30 - WEB_LOG_LEVEL=info - SENTRY_DSN diff --git a/test-server/gunicorn_config.py b/test-server/gunicorn_config.py index c65df238aa..4a7e542bc3 100644 --- a/test-server/gunicorn_config.py +++ b/test-server/gunicorn_config.py @@ -5,7 +5,7 @@ bind = '0.0.0.0:%s' % os.environ.get('PORT', '5000') workers = int(os.environ.get('WEB_WORKERS', 2)) -timeout = int(os.environ.get('WEB_TIMEOUT', 10)) +timeout = int(os.environ.get('WEB_TIMEOUT', 30)) loglevel = os.environ.get('WEB_LOG_LEVEL', 'warning')