aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-11 10:36:05 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-14 09:11:27 +0100
commit59fd824cf3434a8417b73230f1840fed327e3495 (patch)
treeb3c25022099adf2a41ed8da5328c4147d60add83 /server/tests/api/notifications
parent34caef7fc0710623c6894549423813d53f65b303 (diff)
downloadPeerTube-59fd824cf3434a8417b73230f1840fed327e3495.tar.gz
PeerTube-59fd824cf3434a8417b73230f1840fed327e3495.tar.zst
PeerTube-59fd824cf3434a8417b73230f1840fed327e3495.zip
Fix tests timeout
Diffstat (limited to 'server/tests/api/notifications')
-rw-r--r--server/tests/api/notifications/moderation-notifications.ts6
-rw-r--r--server/tests/api/notifications/user-notifications.ts24
2 files changed, 15 insertions, 15 deletions
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 () {
546 }) 546 })
547 547
548 it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () { 548 it('Should send unblacklist but not published/subscription notes after unblacklisted if scheduled update pending', async function () {
549 this.timeout(20000) 549 this.timeout(40000)
550 550
551 const updateAt = new Date(new Date().getTime() + 1000000) 551 const updateAt = new Date(new Date().getTime() + 1000000)
552 552
@@ -578,7 +578,7 @@ describe('Test moderation notifications', function () {
578 }) 578 })
579 579
580 it('Should not send publish/subscription notifications after scheduled update if video still auto-blacklisted', async function () { 580 it('Should not send publish/subscription notifications after scheduled update if video still auto-blacklisted', async function () {
581 this.timeout(20000) 581 this.timeout(40000)
582 582
583 // In 2 seconds 583 // In 2 seconds
584 const updateAt = new Date(new Date().getTime() + 2000) 584 const updateAt = new Date(new Date().getTime() + 2000)
@@ -604,7 +604,7 @@ describe('Test moderation notifications', function () {
604 }) 604 })
605 605
606 it('Should not send a notification to moderators on new video without auto-blacklist', async function () { 606 it('Should not send a notification to moderators on new video without auto-blacklist', async function () {
607 this.timeout(20000) 607 this.timeout(40000)
608 608
609 const name = 'video without auto-blacklist ' + uuidv4() 609 const name = 'video without auto-blacklist ' + uuidv4()
610 610
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 () {
65 }) 65 })
66 66
67 it('Should not send notifications if the user does not follow the video publisher', async function () { 67 it('Should not send notifications if the user does not follow the video publisher', async function () {
68 this.timeout(30000) 68 this.timeout(50000)
69 69
70 await uploadRandomVideoOnServers(servers, 1) 70 await uploadRandomVideoOnServers(servers, 1)
71 71
@@ -97,7 +97,7 @@ describe('Test user notifications', function () {
97 }) 97 })
98 98
99 it('Should send a new video notification on a scheduled publication', async function () { 99 it('Should send a new video notification on a scheduled publication', async function () {
100 this.timeout(30000) 100 this.timeout(50000)
101 101
102 // In 2 seconds 102 // In 2 seconds
103 const updateAt = new Date(new Date().getTime() + 2000) 103 const updateAt = new Date(new Date().getTime() + 2000)
@@ -136,7 +136,7 @@ describe('Test user notifications', function () {
136 }) 136 })
137 137
138 it('Should not send a notification before the video is published', async function () { 138 it('Should not send a notification before the video is published', async function () {
139 this.timeout(30000) 139 this.timeout(50000)
140 140
141 const updateAt = new Date(new Date().getTime() + 1000000) 141 const updateAt = new Date(new Date().getTime() + 1000000)
142 142
@@ -154,7 +154,7 @@ describe('Test user notifications', function () {
154 }) 154 })
155 155
156 it('Should send a new video notification when a video becomes public', async function () { 156 it('Should send a new video notification when a video becomes public', async function () {
157 this.timeout(30000) 157 this.timeout(50000)
158 158
159 const data = { privacy: VideoPrivacy.PRIVATE } 159 const data = { privacy: VideoPrivacy.PRIVATE }
160 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) 160 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data)
@@ -168,7 +168,7 @@ describe('Test user notifications', function () {
168 }) 168 })
169 169
170 it('Should send a new video notification when a remote video becomes public', async function () { 170 it('Should send a new video notification when a remote video becomes public', async function () {
171 this.timeout(30000) 171 this.timeout(50000)
172 172
173 const data = { privacy: VideoPrivacy.PRIVATE } 173 const data = { privacy: VideoPrivacy.PRIVATE }
174 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) 174 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data)
@@ -182,7 +182,7 @@ describe('Test user notifications', function () {
182 }) 182 })
183 183
184 it('Should not send a new video notification when a video becomes unlisted', async function () { 184 it('Should not send a new video notification when a video becomes unlisted', async function () {
185 this.timeout(30000) 185 this.timeout(50000)
186 186
187 const data = { privacy: VideoPrivacy.PRIVATE } 187 const data = { privacy: VideoPrivacy.PRIVATE }
188 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data) 188 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1, data)
@@ -193,7 +193,7 @@ describe('Test user notifications', function () {
193 }) 193 })
194 194
195 it('Should not send a new video notification when a remote video becomes unlisted', async function () { 195 it('Should not send a new video notification when a remote video becomes unlisted', async function () {
196 this.timeout(30000) 196 this.timeout(50000)
197 197
198 const data = { privacy: VideoPrivacy.PRIVATE } 198 const data = { privacy: VideoPrivacy.PRIVATE }
199 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data) 199 const { name, uuid } = await uploadRandomVideoOnServers(servers, 2, data)
@@ -237,7 +237,7 @@ describe('Test user notifications', function () {
237 }) 237 })
238 238
239 it('Should not send a notification if transcoding is not enabled', async function () { 239 it('Should not send a notification if transcoding is not enabled', async function () {
240 this.timeout(30000) 240 this.timeout(50000)
241 241
242 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1) 242 const { name, uuid } = await uploadRandomVideoOnServers(servers, 1)
243 await waitJobs(servers) 243 await waitJobs(servers)
@@ -416,7 +416,7 @@ describe('Test user notifications', function () {
416 }) 416 })
417 417
418 it('Should notify when a local channel is following one of our channel', async function () { 418 it('Should notify when a local channel is following one of our channel', async function () {
419 this.timeout(30000) 419 this.timeout(50000)
420 420
421 await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1_channel@localhost:' + servers[0].port) 421 await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1_channel@localhost:' + servers[0].port)
422 await waitJobs(servers) 422 await waitJobs(servers)
@@ -427,7 +427,7 @@ describe('Test user notifications', function () {
427 }) 427 })
428 428
429 it('Should notify when a remote channel is following one of our channel', async function () { 429 it('Should notify when a remote channel is following one of our channel', async function () {
430 this.timeout(30000) 430 this.timeout(50000)
431 431
432 await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1_channel@localhost:' + servers[0].port) 432 await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1_channel@localhost:' + servers[0].port)
433 await waitJobs(servers) 433 await waitJobs(servers)
@@ -439,7 +439,7 @@ describe('Test user notifications', function () {
439 439
440 // PeerTube does not support accout -> account follows 440 // PeerTube does not support accout -> account follows
441 // it('Should notify when a local account is following one of our channel', async function () { 441 // it('Should notify when a local account is following one of our channel', async function () {
442 // this.timeout(30000) 442 // this.timeout(50000)
443 // 443 //
444 // await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1@localhost:' + servers[0].port) 444 // await addUserSubscription(servers[0].url, servers[0].accessToken, 'user_1@localhost:' + servers[0].port)
445 // 445 //
@@ -449,7 +449,7 @@ describe('Test user notifications', function () {
449 // }) 449 // })
450 450
451 // it('Should notify when a remote account is following one of our channel', async function () { 451 // it('Should notify when a remote account is following one of our channel', async function () {
452 // this.timeout(30000) 452 // this.timeout(50000)
453 // 453 //
454 // await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1@localhost:' + servers[0].port) 454 // await addUserSubscription(servers[1].url, servers[1].accessToken, 'user_1@localhost:' + servers[0].port)
455 // 455 //