wait for more time for upgrades

This commit is contained in:
Girish Ramakrishnan 2016-06-18 13:33:03 -05:00
parent f2a0757e86
commit a85ae4873f
2 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ Cloudron.prototype.waitForApp = function (appId, version) {
var res;
for (var i = 0; i < 60; i++) {
sleep(20);
sleep(30);
process.stdout.write('.');
res = request.get(this._origin + '/api/v1/apps/'+ appId).query({ access_token: this._credentials.accessToken }).end();
common.verifyResponse2xx(res, 'Could not query app status');
@ -312,7 +312,7 @@ Cloudron.prototype.waitForUpdate = function (toVersion) {
process.stdout.write('Waiting for update.');
var res;
for (var i = 0; i < 60; i++) {
sleep(20);
sleep(30);
res = request.get(this._origin + '/api/v1/cloudron/status').end();
if (res.statusCode === 200 && res.body.version === toVersion) {
console.log();

View File

@ -113,13 +113,13 @@ describe('Cloudron update testing', function () {
it('can update to new version', function () {
console.log('Wait for cloudron to get the update');
cloudron.checkForUpdates();
sleep(60 * 5); // give it 5 mins to autoupdate the box and the app
sleep(60 * 10); // give it 10 mins to autoupdate the box and the app
cloudron.waitForUpdate(nextVersion);
});
it('auto updates the app with new version', function () {
cloudron.checkForUpdates();
sleep(60 * 5); // give it 5 mins to autoupdate the box and the app
sleep(60 * 10); // give it 10 mins to autoupdate the box and the app
cloudron.waitForApp(appId, common.TESTAPP_VERSION);
});