tests: Remove overly aggressive timeouts

This commit is contained in:
Richard Hansen 2021-10-02 19:09:12 -04:00
parent 90a2b553d1
commit 39a971e3b9
3 changed files with 0 additions and 37 deletions

View file

@ -21,7 +21,6 @@ describe(__filename, function () {
describe('Connectivity For Character Encoding', function () {
it('can connect', function (done) {
this.timeout(250);
agent.get('/api/')
.expect('Content-Type', /json/)
.expect(200, done);
@ -29,7 +28,6 @@ describe(__filename, function () {
});
describe('API Versioning', function () {
this.timeout(150);
it('finds the version tag', function (done) {
agent.get('/api/')
.expect((res) => {
@ -43,7 +41,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`;
@ -54,7 +51,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');
@ -66,7 +62,6 @@ describe(__filename, function () {
describe('setHTML', function () {
it('Sets the HTML of a Pad attempting to weird utf8 encoded content', function (done) {
this.timeout(1000);
fs.readFile('tests/backend/specs/api/emojis.html', 'utf8', (err, html) => {
agent.post(endPoint('setHTML'))
.send({
@ -84,7 +79,6 @@ describe(__filename, function () {
describe('getHTML', function () {
it('get the HTML of Pad with emojis', function (done) {
this.timeout(400);
agent.get(`${endPoint('getHTML')}&padID=${testPadId}`)
.expect((res) => {
if (res.body.data.html.indexOf('&#127484') === -1) {