зеркало из https://github.com/mozilla/fxa.git
Merge pull request #1996 from lmorchard/circleci-oom-tweaks
fix(content): clear up browser memory after most content-server tests
This commit is contained in:
Коммит
60539d9ced
|
@ -46,14 +46,14 @@ if grep -e "$MODULE" -e 'all' $DIR/../packages/test.list; then
|
|||
|
||||
cd ../../
|
||||
npx pm2 delete servers.json && npx pm2 start servers.json
|
||||
# ensure email-service is ready
|
||||
check 127.0.0.1:8001/__heartbeat__
|
||||
cd packages/fxa-content-server
|
||||
mozdownload --version 58.0 --destination firefox.tar.bz2
|
||||
|
||||
if [ -n "${PAIRING}" ]; then
|
||||
wget https://s3-us-west-2.amazonaws.com/fxa-dev-bucket/fenix-pair/desktop/7f10c7614e9fa46-target.tar.bz2
|
||||
mozinstall 7f10c7614e9fa46-target.tar.bz2
|
||||
# ensure email-service is ready
|
||||
check 127.0.0.1:8001/__heartbeat__
|
||||
test_suite pairing
|
||||
|
||||
mozinstall firefox.tar.bz2
|
||||
|
@ -61,6 +61,8 @@ if grep -e "$MODULE" -e 'all' $DIR/../packages/test.list; then
|
|||
|
||||
else
|
||||
mozinstall firefox.tar.bz2
|
||||
# ensure email-service is ready
|
||||
check 127.0.0.1:8001/__heartbeat__
|
||||
test_suite circle
|
||||
fi
|
||||
else
|
||||
|
|
|
@ -437,6 +437,21 @@ const closeAllButFirstWindow = thenify(function() {
|
|||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Get some memory back
|
||||
*
|
||||
*/
|
||||
const cleanMemory = thenify(function(selector, attributeName) {
|
||||
return (
|
||||
this.parent
|
||||
.get('about:memory')
|
||||
// Click the Minimize Memory Usage button
|
||||
.then(click('div.opsRow:nth-child(3) > button:nth-child(4)'))
|
||||
.then(testElementExists('.section'))
|
||||
.end()
|
||||
);
|
||||
});
|
||||
|
||||
const clearBrowserState = thenify(function(options) {
|
||||
options = options || {};
|
||||
if (!('contentServer' in options)) {
|
||||
|
@ -467,6 +482,7 @@ const clearBrowserState = thenify(function(options) {
|
|||
return this.parent.then(clear123DoneState({ untrusted: true }));
|
||||
}
|
||||
})
|
||||
.then(cleanMemory())
|
||||
.then(closeAllButFirstWindow());
|
||||
});
|
||||
|
||||
|
@ -2188,21 +2204,6 @@ const noSuchAttribute = thenify(function(selector, attributeName) {
|
|||
.end();
|
||||
});
|
||||
|
||||
/**
|
||||
* Get some memory back
|
||||
*
|
||||
*/
|
||||
const cleanMemory = thenify(function(selector, attributeName) {
|
||||
return (
|
||||
this.parent
|
||||
.get('about:memory')
|
||||
// Click the Minimize Memory Usage button
|
||||
.then(click('div.opsRow:nth-child(3) > button:nth-child(4)'))
|
||||
.then(testElementExists('.section'))
|
||||
.end()
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Denormalize the email stored in an account. Sets the email to be all uppercase.
|
||||
*
|
||||
|
|
Загрузка…
Ссылка в новой задаче