|
@@ -250,15 +250,14 @@ describe('Application life cycle test', function () {
|
|
|
this.timeout(6 * 60 * 1000); // cron runs only every 5 minutes
|
|
|
console.log('It can take upto 6 mins to detect that cron is working');
|
|
|
|
|
|
- // cron jobs are only executed when app is running and healthy
|
|
|
- setTimeout(function () {
|
|
|
+ function checkLogs() {
|
|
|
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();
|
|
|
|
|
|
- console.log(logs);
|
|
|
+ setTimeout(checkLogs, 45000);
|
|
|
+ }
|
|
|
|
|
|
- done(new Error('cron jobs are possibly not running'));
|
|
|
- }, 45000);
|
|
|
+ setTimeout(checkLogs, 45000);
|
|
|
});
|
|
|
|
|
|
it('move to different location', function () {
|