From 59fd824cf3434a8417b73230f1840fed327e3495 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 Dec 2020 10:36:05 +0100 Subject: Fix tests timeout --- .../api/notifications/moderation-notifications.ts | 6 +++--- .../tests/api/notifications/user-notifications.ts | 24 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'server/tests/api/notifications') diff --git a/server/tests/api/notifications/moderation-notifications.ts b/server/tests/api/notifications/moderation-notifications.ts index 24c91a365..81f02ff99 100644 --- a/server/tests/api/notifications/moderation-notifications.ts +++ b/server/tests/api/notifications/moderation-notifications.ts @@ -546,7 +546,7 @@ describe('Test moderation notifications', function () { }) it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () { - this.timeout(20000) + this.timeout(40000) const updateAt = new Date(new Date().getTime() + 1000000) @@ -578,7 +578,7 @@ describe('Test moderation notifications', function () { }) it('Should not send publish/subscription notifications after scheduled update if video still auto-blacklisted', async function () { - this.timeout(20000) + this.timeout(40000) // In 2 seconds const updateAt = new Date(new Date().getTime() + 2000) @@ -604,7 +604,7 @@ describe('Test moderation notifications', function () { }) it('Should not send a notification to moderators on new video without auto-blacklist', async function () { - this.timeout(20000) + this.timeout(40000) const name = 'video without auto-blacklist ' + uuidv4() diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts index edc95b069..6e7e7b19f 100644 --- a/server/tests/api/notifications/user-notifications.ts +++ b/server/tests/api/notifications/user-notifications.ts @@ -65,7 +65,7 @@ describe('Test user notifications', function () { }) it('Should not send notifications if the user does not follow the video publisher', async function () { - this.timeout(30000) + this.timeout(50000) await uploadRandomVideoOnServers(servers, 1) @@ -97,7 +97,7 @@ describe('Test user notifications', function () { }) it('Should send a new video notification on a scheduled publication', async function () { - this.timeout(30000) + this.timeout(50000) // In 2 seconds const updateAt = new Date(new Date().getTime() + 2000) @@ -136,7 +136,7 @@ describe('Test user notifications', function () { }) it('Should not send a notification before the video is published', async function () { - this.timeout(30000) + this.timeout(50000) const updateAt = new Date(new Date().getTime() + 1000000) @@ -154,7 +154,7 @@ describe('Test user notifications', function () { }) it('Should send a new video notification when a video becomes public', async function () { - this.timeout(30000) + this.timeout(50000) const data = { privacy: VideoPrivacy.PRIVATE } const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) @@ -168,7 +168,7 @@ describe('Test user notifications', function () { }) it('Should send a new video notification when a remote video becomes public', async function () { - this.timeout(30000) + this.timeout(50000) const data = { privacy: VideoPrivacy.PRIVATE } const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) @@ -182,7 +182,7 @@ describe('Test user notifications', function () { }) it('Should not send a new video notification when a video becomes unlisted', async function () { - this.timeout(30000) + this.timeout(50000) const data = { privacy: VideoPrivacy.PRIVATE } const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) @@ -193,7 +193,7 @@ describe('Test user notifications', function () { }) it('Should not send a new video notification when a remote video becomes unlisted', async function () { - this.timeout(30000) + this.timeout(50000) const data = { privacy: VideoPrivacy.PRIVATE } const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) @@ -237,7 +237,7 @@ describe('Test user notifications', function () { }) it('Should not send a notification if transcoding is not enabled', async function () { - this.timeout(30000) + this.timeout(50000) const { name, uuid } = await uploadRandomVideoOnServers(servers, 1) await waitJobs(servers) @@ -416,7 +416,7 @@ describe('Test user notifications', function () { }) it('Should notify when a local channel is following one of our channel', async function () { - this.timeout(30000) + this.timeout(50000) await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1_channel@localhost:' + servers[0].port) await waitJobs(servers) @@ -427,7 +427,7 @@ describe('Test user notifications', function () { }) it('Should notify when a remote channel is following one of our channel', async function () { - this.timeout(30000) + this.timeout(50000) await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1_channel@localhost:' + servers[0].port) await waitJobs(servers) @@ -439,7 +439,7 @@ describe('Test user notifications', function () { // PeerTube does not support accout -> account follows // it('Should notify when a local account is following one of our channel', async function () { - // this.timeout(30000) + // this.timeout(50000) // // await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1@localhost:' + servers[0].port) // @@ -449,7 +449,7 @@ describe('Test user notifications', function () { // }) // it('Should notify when a remote account is following one of our channel', async function () { - // this.timeout(30000) + // this.timeout(50000) // // await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1@localhost:' + servers[0].port) // -- cgit v1.2.3