diff --git a/src/tests/backend/specs/api/chat.js b/src/tests/backend/specs/api/chat.js index 17f5bf4ef..fcc69a363 100644 --- a/src/tests/backend/specs/api/chat.js +++ b/src/tests/backend/specs/api/chat.js @@ -39,7 +39,6 @@ describe(__filename, function () { */ describe('createPad', function () { - this.timeout(400); it('creates a new Pad', function (done) { agent.get(`${endPoint('createPad')}&padID=${padID}`) .expect((res) => { @@ -51,7 +50,6 @@ describe(__filename, function () { }); describe('createAuthor', function () { - this.timeout(100); it('Creates an author with a name set', function (done) { agent.get(endPoint('createAuthor')) .expect((res) => { @@ -66,7 +64,6 @@ describe(__filename, function () { }); describe('appendChatMessage', function () { - this.timeout(100); it('Adds a chat message to the pad', function (done) { agent.get(`${endPoint('appendChatMessage')}&padID=${padID}&text=blalblalbha` + `&authorID=${authorID}&time=${timestamp}`) @@ -80,7 +77,6 @@ describe(__filename, function () { describe('getChatHead', function () { - this.timeout(100); it('Gets the head of chat', function (done) { agent.get(`${endPoint('getChatHead')}&padID=${padID}`) .expect((res) => { @@ -94,7 +90,6 @@ describe(__filename, function () { }); describe('getChatHistory', function () { - this.timeout(40); it('Gets Chat History of a Pad', function (done) { agent.get(`${endPoint('getChatHistory')}&padID=${padID}`) .expect((res) => { diff --git a/src/tests/backend/specs/api/importexportGetPost.js b/src/tests/backend/specs/api/importexportGetPost.js index a68ba4011..54d085eda 100644 --- a/src/tests/backend/specs/api/importexportGetPost.js +++ b/src/tests/backend/specs/api/importexportGetPost.js @@ -31,7 +31,6 @@ describe(__filename, function () { describe('Connectivity', function () { it('can connect', async function () { - this.timeout(250); await agent.get('/api/') .expect(200) .expect('Content-Type', /json/); @@ -40,7 +39,6 @@ describe(__filename, function () { describe('API Versioning', function () { it('finds the version tag', async function () { - this.timeout(250); await agent.get('/api/') .expect(200) .expect((res) => assert(res.body.currentVersion)); @@ -96,7 +94,6 @@ describe(__filename, function () { }); it('creates a new Pad, imports content to it, checks that content', async function () { - this.timeout(500); await agent.get(`${endPoint('createPad')}&padID=${testPadId}`) .expect(200) .expect('Content-Type', /json/) @@ -111,7 +108,6 @@ describe(__filename, function () { for (const authn of [false, true]) { it(`can export from read-only pad ID, authn ${authn}`, async function () { - this.timeout(250); settings.requireAuthentication = authn; const get = (ep) => { let req = agent.get(ep); @@ -129,8 +125,6 @@ describe(__filename, function () { } describe('Import/Export tests requiring AbiWord/LibreOffice', function () { - this.timeout(10000); - before(async function () { if ((!settings.abiword || settings.abiword.indexOf('/') === -1) && (!settings.soffice || settings.soffice.indexOf('/') === -1)) { diff --git a/src/tests/backend/specs/api/pad.js b/src/tests/backend/specs/api/pad.js index bb0ecdd9a..e50f9a6ab 100644 --- a/src/tests/backend/specs/api/pad.js +++ b/src/tests/backend/specs/api/pad.js @@ -51,7 +51,6 @@ describe(__filename, function () { describe('Connectivity', function () { it('can connect', function (done) { - this.timeout(200); agent.get('/api/') .expect('Content-Type', /json/) .expect(200, done); @@ -60,7 +59,6 @@ describe(__filename, function () { describe('API Versioning', function () { it('finds the version tag', function (done) { - this.timeout(150); agent.get('/api/') .expect((res) => { apiVersion = res.body.currentVersion; @@ -73,7 +71,6 @@ describe(__filename, function () { describe('Permission', function () { it('errors with invalid APIKey', function (done) { - this.timeout(150); // This is broken because Etherpad doesn't handle HTTP codes properly see #2343 // If your APIKey is password you deserve to fail all tests anyway const permErrorURL = `/api/${apiVersion}/createPad?apikey=password&padID=test`; @@ -126,7 +123,6 @@ describe(__filename, function () { describe('deletePad', function () { it('deletes a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('deletePad')}&padID=${testPadId}`) .expect('Content-Type', /json/) .expect(200, done); // @TODO: we shouldn't expect 200 here since the pad may not exist @@ -135,7 +131,6 @@ describe(__filename, function () { describe('createPad', function () { it('creates a new Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('createPad')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to create new Pad'); @@ -147,7 +142,6 @@ describe(__filename, function () { describe('getRevisionsCount', function () { it('gets revision count of Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('getRevisionsCount')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to get Revision Count'); @@ -160,7 +154,6 @@ describe(__filename, function () { describe('getSavedRevisionsCount', function () { it('gets saved revisions count of Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('getSavedRevisionsCount')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to get Saved Revisions Count'); @@ -175,7 +168,6 @@ describe(__filename, function () { describe('listSavedRevisions', function () { it('gets saved revision list of Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('listSavedRevisions')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to get Saved Revisions List'); @@ -188,7 +180,6 @@ describe(__filename, function () { describe('getHTML', function () { it('get the HTML of Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('getHTML')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.html.length <= 1) throw new Error('Unable to get the HTML'); @@ -200,7 +191,6 @@ describe(__filename, function () { describe('listAllPads', function () { it('list all pads', function (done) { - this.timeout(150); agent.get(endPoint('listAllPads')) .expect((res) => { if (res.body.data.padIDs.includes(testPadId) !== true) { @@ -214,7 +204,6 @@ describe(__filename, function () { describe('deletePad', function () { it('deletes a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('deletePad')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Deletion failed'); @@ -226,7 +215,6 @@ describe(__filename, function () { describe('listAllPads', function () { it('list all pads', function (done) { - this.timeout(150); agent.get(endPoint('listAllPads')) .expect((res) => { if (res.body.data.padIDs.includes(testPadId) !== false) { @@ -240,7 +228,6 @@ describe(__filename, function () { describe('getHTML', function () { it('get the HTML of a Pad -- Should return a failure', function (done) { - this.timeout(150); agent.get(`${endPoint('getHTML')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 1) throw new Error('Pad deletion failed'); @@ -252,7 +239,6 @@ describe(__filename, function () { describe('createPad', function () { it('creates a new Pad with text', function (done) { - this.timeout(200); agent.get(`${endPoint('createPad')}&padID=${testPadId}&text=testText`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Creation failed'); @@ -264,7 +250,6 @@ describe(__filename, function () { describe('getText', function () { it('gets the Pad text and expect it to be testText with \n which is a line break', function (done) { - this.timeout(150); agent.get(`${endPoint('getText')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.text !== 'testText\n') throw new Error('Pad Creation with text'); @@ -276,7 +261,6 @@ describe(__filename, function () { describe('setText', function () { it('creates a new Pad with text', function (done) { - this.timeout(200); agent.post(endPoint('setText')) .send({ padID: testPadId, @@ -292,7 +276,6 @@ describe(__filename, function () { describe('getText', function () { it('gets the Pad text', function (done) { - this.timeout(150); agent.get(`${endPoint('getText')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.text !== 'testTextTwo\n') throw new Error('Setting Text'); @@ -304,7 +287,6 @@ describe(__filename, function () { describe('getRevisionsCount', function () { it('gets Revision Count of a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('getRevisionsCount')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.revisions !== 1) throw new Error('Unable to get text revision count'); @@ -316,7 +298,6 @@ describe(__filename, function () { describe('saveRevision', function () { it('saves Revision', function (done) { - this.timeout(150); agent.get(`${endPoint('saveRevision')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to save Revision'); @@ -328,7 +309,6 @@ describe(__filename, function () { describe('getSavedRevisionsCount', function () { it('gets saved revisions count of Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('getSavedRevisionsCount')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to get Saved Revisions Count'); @@ -343,7 +323,6 @@ describe(__filename, function () { describe('listSavedRevisions', function () { it('gets saved revision list of Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('listSavedRevisions')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Unable to get Saved Revisions List'); @@ -355,7 +334,6 @@ describe(__filename, function () { }); describe('padUsersCount', function () { it('gets User Count of a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('padUsersCount')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.padUsersCount !== 0) throw new Error('Incorrect Pad User count'); @@ -367,7 +345,6 @@ describe(__filename, function () { describe('getReadOnlyID', function () { it('Gets the Read Only ID of a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('getReadOnlyID')}&padID=${testPadId}`) .expect((res) => { if (!res.body.data.readOnlyID) throw new Error('No Read Only ID for Pad'); @@ -379,7 +356,6 @@ describe(__filename, function () { describe('listAuthorsOfPad', function () { it('Get Authors of the Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('listAuthorsOfPad')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.authorIDs.length !== 0) { @@ -393,7 +369,6 @@ describe(__filename, function () { describe('getLastEdited', function () { it('Get When Pad was left Edited', function (done) { - this.timeout(150); agent.get(`${endPoint('getLastEdited')}&padID=${testPadId}`) .expect((res) => { if (!res.body.data.lastEdited) { @@ -409,7 +384,6 @@ describe(__filename, function () { describe('setText', function () { it('creates a new Pad with text', function (done) { - this.timeout(200); agent.post(endPoint('setText')) .send({ padID: testPadId, @@ -425,7 +399,6 @@ describe(__filename, function () { describe('getLastEdited', function () { it('Get When Pad was left Edited', function (done) { - this.timeout(150); agent.get(`${endPoint('getLastEdited')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.lastEdited <= lastEdited) { @@ -439,7 +412,6 @@ describe(__filename, function () { describe('padUsers', function () { it('gets User Count of a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('padUsers')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.padUsers.length !== 0) throw new Error('Incorrect Pad Users'); @@ -451,7 +423,6 @@ describe(__filename, function () { describe('deletePad', function () { it('deletes a Pad', function (done) { - this.timeout(150); agent.get(`${endPoint('deletePad')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Deletion failed'); @@ -466,7 +437,6 @@ describe(__filename, function () { describe('createPad', function () { it('creates a new Pad with text', function (done) { - this.timeout(200); agent.get(`${endPoint('createPad')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Creation failed'); @@ -478,7 +448,6 @@ describe(__filename, function () { describe('setText', function () { it('Sets text on a pad Id', function (done) { - this.timeout(150); agent.post(`${endPoint('setText')}&padID=${testPadId}`) .field({text}) .expect((res) => { @@ -491,7 +460,6 @@ describe(__filename, function () { describe('getText', function () { it('Gets text on a pad Id', function (done) { - this.timeout(200); agent.get(`${endPoint('getText')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Get Text failed'); @@ -504,7 +472,6 @@ describe(__filename, function () { describe('setText', function () { it('Sets text on a pad Id including an explicit newline', function (done) { - this.timeout(200); agent.post(`${endPoint('setText')}&padID=${testPadId}`) .field({text: `${text}\n`}) .expect((res) => { @@ -517,7 +484,6 @@ describe(__filename, function () { describe('getText', function () { it("Gets text on a pad Id and doesn't have an excess newline", function (done) { - this.timeout(150); agent.get(`${endPoint('getText')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Get Text failed'); @@ -530,7 +496,6 @@ describe(__filename, function () { describe('getLastEdited', function () { it('Gets when pad was last edited', function (done) { - this.timeout(150); agent.get(`${endPoint('getLastEdited')}&padID=${testPadId}`) .expect((res) => { if (res.body.lastEdited === 0) throw new Error('Get Last Edited Failed'); @@ -542,7 +507,6 @@ describe(__filename, function () { describe('movePad', function () { it('Move a Pad to a different Pad ID', function (done) { - this.timeout(200); agent.get(`${endPoint('movePad')}&sourceID=${testPadId}&destinationID=${newPadId}&force=true`) .expect((res) => { if (res.body.code !== 0) throw new Error('Moving Pad Failed'); @@ -554,7 +518,6 @@ describe(__filename, function () { describe('getText', function () { it('Gets text on a pad Id', function (done) { - this.timeout(150); agent.get(`${endPoint('getText')}&padID=${newPadId}`) .expect((res) => { if (res.body.data.text !== `${text}\n`) throw new Error('Pad Get Text failed'); @@ -566,7 +529,6 @@ describe(__filename, function () { describe('movePad', function () { it('Move a Pad to a different Pad ID', function (done) { - this.timeout(200); agent.get(`${endPoint('movePad')}&sourceID=${newPadId}&destinationID=${testPadId}` + '&force=false') .expect((res) => { @@ -579,7 +541,6 @@ describe(__filename, function () { describe('getText', function () { it('Gets text on a pad Id', function (done) { - this.timeout(150); agent.get(`${endPoint('getText')}&padID=${testPadId}`) .expect((res) => { if (res.body.data.text !== `${text}\n`) throw new Error('Pad Get Text failed'); @@ -591,7 +552,6 @@ describe(__filename, function () { describe('getLastEdited', function () { it('Gets when pad was last edited', function (done) { - this.timeout(150); agent.get(`${endPoint('getLastEdited')}&padID=${testPadId}`) .expect((res) => { if (res.body.lastEdited === 0) throw new Error('Get Last Edited Failed'); @@ -603,7 +563,6 @@ describe(__filename, function () { describe('appendText', function () { it('Append text to a pad Id', function (done) { - this.timeout(150); agent.get(`${endPoint('appendText', '1.2.13')}&padID=${testPadId}&text=hello`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Append Text failed'); @@ -615,7 +574,6 @@ describe(__filename, function () { describe('getText', function () { it('Gets text on a pad Id', function (done) { - this.timeout(150); agent.get(`${endPoint('getText')}&padID=${testPadId}`) .expect((res) => { if (res.body.code !== 0) throw new Error('Pad Get Text failed'); @@ -631,7 +589,6 @@ describe(__filename, function () { describe('setHTML', function () { it('Sets the HTML of a Pad attempting to pass ugly HTML', function (done) { - this.timeout(200); const html = '