diff --git a/cloudron.js b/cloudron.js index 533aab5..b96a547 100644 --- a/cloudron.js +++ b/cloudron.js @@ -426,6 +426,7 @@ Cloudron.prototype.setEmailEnabled = function (enabled) { .send({ enabled: enabled }) .end(); common.verifyResponse2xx(res, 'Could not enable email'); + sleep(60); // generously wait for the mail server to restart. it takes 10 seconds to stop it... and then there is DNS propagation }; Cloudron.prototype.checkTimeZone = function (tz) { diff --git a/test/cloudron-backup-test.js b/test/cloudron-backup-test.js index 9e879f1..e5b1338 100644 --- a/test/cloudron-backup-test.js +++ b/test/cloudron-backup-test.js @@ -68,7 +68,6 @@ describe('Cloudron backup testing', function () { it('can enable email', function () { cloudron.setEmailEnabled(true); - sleep(20); // sometime for the mail container to come up }); // mail alias tests (do this here because alias takes sometime to propagate) diff --git a/test/cloudron-migrate-test.js b/test/cloudron-migrate-test.js index b07eb36..0bbd950 100644 --- a/test/cloudron-migrate-test.js +++ b/test/cloudron-migrate-test.js @@ -71,7 +71,6 @@ describe('Custom domain test', function () { it('can enable email', function () { cloudron.setEmailEnabled(true); - sleep(20); // sometime for the mail container to come up }); it('can migrate cloudron to custom domain', function () { diff --git a/test/selfhost-ec2-create-test.js b/test/selfhost-ec2-create-test.js index c79a1b8..cbbef3f 100644 --- a/test/selfhost-ec2-create-test.js +++ b/test/selfhost-ec2-create-test.js @@ -126,7 +126,6 @@ describe('Selfhost EC2 Cloudron creation', function () { it('can enable email', function () { cloudron.setEmailEnabled(true); - sleep(20); // sometime for the mail container to come up }); it('send mail to cloudron user', function (done) {