Girish Ramakrishnan před 7 roky
rodič
revize
f6851c5d94
1 změnil soubory, kde provedl 9 přidání a 4 odebrání
  1. 9 4
      test/test.js

+ 9 - 4
test/test.js

@@ -246,12 +246,17 @@ describe('Application life cycle test', function () {
     it('can login', login.bind(null, username, password));
 
     it('runs cron jobs', function (done) {
-        var logs = execSync('cloudron logs --lines 1000 --app ' + app.id).toString('utf8');
-        if (logs.indexOf('Executed the cron event \'wp_version_check\'') !== -1) return done();
+        this.timeout(120000);
 
-        console.log(logs);
+        // cron jobs are only executed when app is running and healthy
+        setTimeout(function () {
+            var logs = execSync('cloudron logs --lines 1000 --app ' + app.id).toString('utf8');
+            if (logs.indexOf('Executed the cron event \'wp_version_check\'') !== -1) return done();
 
-        done(new Error('cron jobs are possibly not running'));
+            console.log(logs);
+
+            done(new Error('cron jobs are possibly not running'));
+        }, 45000);
     });
 
     it('move to different location', function () {