Remove all individual test timeouts and ignore timeouts toplevel

This commit is contained in:
Johannes Zellner
2018-12-01 00:50:22 +01:00
parent f5f92fbb03
commit 54c96d98d1
17 changed files with 15 additions and 62 deletions
-9
View File
@@ -264,8 +264,6 @@ function stopBox(done) {
}
describe('App API', function () {
this.timeout(100000);
before(startBox);
after(stopBox);
@@ -618,11 +616,7 @@ describe('App API', function () {
});
describe('App installation', function () {
this.timeout(100000);
var apiHockInstance = hock.createHock({ throwOnUnmatched: false });
var apiHockServer;
var validCert1, validKey1;
before(function (done) {
@@ -820,7 +814,6 @@ describe('App installation', function () {
});
it('installation - app can check addons', function (done) {
this.timeout(120000);
console.log('This test can take a while as it waits for scheduler addon to tick 3');
checkAddons(appEntry, done);
});
@@ -949,7 +942,6 @@ describe('App installation', function () {
});
it('installation - app can check addons', function (done) {
this.timeout(120000);
console.log('This test can take a while as it waits for scheduler addon to tick 2');
checkAddons(appEntry, done);
});
@@ -1076,7 +1068,6 @@ describe('App installation', function () {
});
it('installation - app can check addons', function (done) {
this.timeout(120000);
console.log('This test can take a while as it waits for scheduler addon to tick 4');
checkAddons(appEntry, done);
});
-2
View File
@@ -483,8 +483,6 @@ describe('Clients', function () {
});
describe('delete tokens by client', function () {
this.timeout(5000);
before(setup2);
after(cleanup);
-2
View File
@@ -37,8 +37,6 @@ function cleanup(done) {
}
describe('Developer API', function () {
this.timeout(20000);
describe('login', function () {
before(function (done) {
async.series([
-2
View File
@@ -43,8 +43,6 @@ var DOMAIN_1 = {
};
describe('Domains API', function () {
this.timeout(10000);
before(function (done) {
config._reset();
config.setFqdn(DOMAIN);
-2
View File
@@ -78,8 +78,6 @@ function cleanup(done) {
}
describe('Eventlog API', function () {
this.timeout(10000);
before(setup);
after(cleanup);
-4
View File
@@ -105,8 +105,6 @@ function cleanup(done) {
}
describe('Mail API', function () {
this.timeout(10000);
before(setup);
after(cleanup);
@@ -231,8 +229,6 @@ describe('Mail API', function () {
var dnsAnswerQueue = [];
var dkimDomain, spfDomain, mxDomain, dmarcDomain;
this.timeout(10000);
before(function (done) {
var dns = require('../../native-dns.js');
-2
View File
@@ -24,8 +24,6 @@ const EMAIL_0_NEW_FALLBACK = 'stupIDfallback@me.com';
const DISPLAY_NAME_0_NEW = 'New Name';
describe('Profile API', function () {
this.timeout(5000);
var user_0 = null;
var token_0;
-2
View File
@@ -61,8 +61,6 @@ function cleanup(done) {
}
describe('SSH API', function () {
this.timeout(10000);
before(setup);
after(cleanup);
+11 -13
View File
@@ -65,29 +65,27 @@ function cleanup(done) {
}
describe('Internal API', function () {
this.timeout(5000);
before(setup);
after(cleanup);
describe('backup', function () {
it('succeeds', function (done) {
superagent.post(config.sysadminOrigin() + '/api/v1/backup')
.end(function (error, result) {
expect(result.statusCode).to.equal(202);
.end(function (error, result) {
expect(result.statusCode).to.equal(202);
function checkBackupStartEvent() {
eventlog.getAllPaged([ eventlog.ACTION_BACKUP_START ], '', 1, 100, function (error, result) {
expect(error).to.equal(null);
function checkBackupStartEvent() {
eventlog.getAllPaged([ eventlog.ACTION_BACKUP_START ], '', 1, 100, function (error, result) {
expect(error).to.equal(null);
if (result.length === 0) return setTimeout(checkBackupStartEvent, 1000);
if (result.length === 0) return setTimeout(checkBackupStartEvent, 1000);
done();
});
}
done();
});
}
checkBackupStartEvent();
});
checkBackupStartEvent();
});
});
});
});
-2
View File
@@ -82,8 +82,6 @@ function checkMails(number, done) {
}
describe('Users API', function () {
this.timeout(5000);
var user_0, user_1, user_2, user_4;
var token = null, userToken = null;
var token_1 = tokendb.generateToken();