From 33b91e53d21fba295ecf516b717fb36e91990771 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 May 2023 09:20:28 +0200 Subject: Remove low timeouts Default timeout is 30s --- server/tests/api/videos/single-server.ts | 2 -- server/tests/api/videos/video-change-ownership.ts | 14 -------------- server/tests/api/videos/video-channels.ts | 8 -------- server/tests/api/videos/video-description.ts | 2 -- server/tests/api/videos/video-privacy.ts | 4 ---- server/tests/api/videos/video-schedule-update.ts | 6 ------ server/tests/api/videos/videos-overview.ts | 2 +- 7 files changed, 1 insertion(+), 37 deletions(-) (limited to 'server/tests/api/videos') diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index b44e1bc37..0cb64d5a5 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -136,8 +136,6 @@ describe('Test a single server', function () { }) it('Should upload the video', async function () { - this.timeout(10000) - const attributes = { name: 'my super name', category: 2, diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts index e9ef67493..99d774c2b 100644 --- a/server/tests/api/videos/video-change-ownership.ts +++ b/server/tests/api/videos/video-change-ownership.ts @@ -130,14 +130,10 @@ describe('Test video change ownership - nominal', function () { }) it('Should accept the same change ownership request without crashing', async function () { - this.timeout(10000) - await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser }) }) it('Should not create multiple change ownership requests while one is waiting', async function () { - this.timeout(10000) - const body = await command.list({ token: secondUserToken }) expect(body.total).to.equal(1) @@ -146,14 +142,10 @@ describe('Test video change ownership - nominal', function () { }) it('Should not be possible to refuse the change of ownership from first user', async function () { - this.timeout(10000) - await command.refuse({ token: firstUserToken, ownershipId: lastRequestId, expectedStatus: HttpStatusCode.FORBIDDEN_403 }) }) it('Should be possible to refuse the change of ownership from second user', async function () { - this.timeout(10000) - await command.refuse({ token: secondUserToken, ownershipId: lastRequestId }) }) @@ -184,8 +176,6 @@ describe('Test video change ownership - nominal', function () { }) it('Should not be possible to accept the change of ownership from first user', async function () { - this.timeout(10000) - await command.accept({ token: firstUserToken, ownershipId: lastRequestId, @@ -195,8 +185,6 @@ describe('Test video change ownership - nominal', function () { }) it('Should be possible to accept the change of ownership from second user', async function () { - this.timeout(10000) - await command.accept({ token: secondUserToken, ownershipId: lastRequestId, channelId: secondUserChannelId }) await waitJobs(servers) @@ -309,8 +297,6 @@ describe('Test video change ownership - quota too small', function () { }) it('Should not be possible to accept the change of ownership from second user because of exceeded quota', async function () { - this.timeout(10000) - const { videoChannels } = await server.users.getMyInfo({ token: secondUserToken }) const channelId = videoChannels[0].id diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index 8e2b7937c..f7cf84618 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts @@ -378,8 +378,6 @@ describe('Test video channels', function () { }) it('Should list the second video channel videos', async function () { - this.timeout(10000) - for (const server of servers) { const channelURI = 'second_video_channel@' + servers[0].host const { total, data } = await server.videos.listByChannel({ handle: channelURI }) @@ -392,16 +390,12 @@ describe('Test video channels', function () { }) it('Should change the video channel of a video', async function () { - this.timeout(10000) - await servers[0].videos.update({ id: videoUUID, attributes: { channelId: servers[0].store.channel.id } }) await waitJobs(servers) }) it('Should list the first video channel videos', async function () { - this.timeout(10000) - for (const server of servers) { { const secondChannelURI = 'second_video_channel@' + servers[0].host @@ -452,8 +446,6 @@ describe('Test video channels', function () { }) it('Should report correct channel views per days', async function () { - this.timeout(10000) - { const { data } = await servers[0].channels.listByAccount({ accountName, withStats: true }) diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts index c4185882a..1f3d4adbb 100644 --- a/server/tests/api/videos/video-description.ts +++ b/server/tests/api/videos/video-description.ts @@ -78,8 +78,6 @@ describe('Test video description', function () { }) it('Should update with a short description', async function () { - this.timeout(10000) - const attributes = { description: 'short description' } diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index 264a05d3f..de96bcfcc 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts @@ -99,8 +99,6 @@ describe('Test video privacy', function () { }) it('Should not be able to watch the private video with another user', async function () { - this.timeout(10000) - const user = { username: 'hello', password: 'super password' @@ -254,8 +252,6 @@ describe('Test video privacy', function () { }) it('Should set these videos as private and internal', async function () { - this.timeout(10000) - await servers[0].videos.update({ id: internalVideoId, attributes: { privacy: VideoPrivacy.PRIVATE } }) await servers[0].videos.update({ id: privateVideoId, attributes: { privacy: VideoPrivacy.INTERNAL } }) diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts index 73f1519d9..bf341c648 100644 --- a/server/tests/api/videos/video-schedule-update.ts +++ b/server/tests/api/videos/video-schedule-update.ts @@ -35,8 +35,6 @@ describe('Test video update scheduler', function () { }) it('Should upload a video and schedule an update in 10 seconds', async function () { - this.timeout(10000) - const attributes = { name: 'video 1', privacy: VideoPrivacy.PRIVATE, @@ -89,8 +87,6 @@ describe('Test video update scheduler', function () { }) it('Should upload a video without scheduling an update', async function () { - this.timeout(10000) - const attributes = { name: 'video 2', privacy: VideoPrivacy.PRIVATE @@ -103,8 +99,6 @@ describe('Test video update scheduler', function () { }) it('Should update a video by scheduling an update', async function () { - this.timeout(10000) - const attributes = { name: 'video 2 updated', scheduleUpdate: { diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts index 6e723c510..f2496e35e 100644 --- a/server/tests/api/videos/videos-overview.ts +++ b/server/tests/api/videos/videos-overview.ts @@ -47,7 +47,7 @@ describe('Test a videos overview', function () { }) it('Should upload another video and include all videos in the overview', async function () { - this.timeout(60000) + this.timeout(120000) { for (let i = 1; i < 6; i++) { -- cgit v1.2.3