Skip to content

Commit

Permalink
update test server timeouts (#3618)
Browse files Browse the repository at this point in the history
* update test server timeouts

* fix failing test

* retry prepopulate
  • Loading branch information
petrjasek committed Sep 22, 2020
1 parent 4708ee9 commit 2c332b2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/authoring_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions spec/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test-server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion test-server/gunicorn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 2c332b2

Please sign in to comment.