aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/multiple-servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/multiple-servers.ts')
-rw-r--r--server/tests/api/multiple-servers.ts47
1 files changed, 21 insertions, 26 deletions
diff --git a/server/tests/api/multiple-servers.ts b/server/tests/api/multiple-servers.ts
index 737770992..b6a57ab6d 100644
--- a/server/tests/api/multiple-servers.ts
+++ b/server/tests/api/multiple-servers.ts
@@ -85,7 +85,7 @@ describe('Test multiple servers', function () {
85 } 85 }
86 await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes) 86 await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes)
87 87
88 await wait(11000) 88 await wait(5000)
89 89
90 // All servers should have this video 90 // All servers should have this video
91 for (const server of servers) { 91 for (const server of servers) {
@@ -153,7 +153,7 @@ describe('Test multiple servers', function () {
153 }) 153 })
154 154
155 it('Should upload the video on server 2 and propagate on each server', async function () { 155 it('Should upload the video on server 2 and propagate on each server', async function () {
156 this.timeout(120000) 156 this.timeout(50000)
157 157
158 const user = { 158 const user = {
159 username: 'user1', 159 username: 'user1',
@@ -174,8 +174,8 @@ describe('Test multiple servers', function () {
174 } 174 }
175 await uploadVideo(servers[1].url, userAccessToken, videoAttributes) 175 await uploadVideo(servers[1].url, userAccessToken, videoAttributes)
176 176
177 // Transcoding, so wait more than 22000 177 // Transcoding
178 await wait(60000) 178 await wait(10000)
179 179
180 // All servers should have this video 180 // All servers should have this video
181 for (const server of servers) { 181 for (const server of servers) {
@@ -282,7 +282,7 @@ describe('Test multiple servers', function () {
282 } 282 }
283 await uploadVideo(servers[2].url, servers[2].accessToken, videoAttributes2) 283 await uploadVideo(servers[2].url, servers[2].accessToken, videoAttributes2)
284 284
285 await wait(33000) 285 await wait(10000)
286 286
287 let baseMagnet = null 287 let baseMagnet = null
288 // All servers should have this video 288 // All servers should have this video
@@ -384,8 +384,7 @@ describe('Test multiple servers', function () {
384 384
385 describe('Should seed the uploaded video', function () { 385 describe('Should seed the uploaded video', function () {
386 it('Should add the file 1 by asking server 3', async function () { 386 it('Should add the file 1 by asking server 3', async function () {
387 // Yes, this could be long 387 this.timeout(10000)
388 this.timeout(200000)
389 388
390 const res = await getVideosList(servers[2].url) 389 const res = await getVideosList(servers[2].url)
391 390
@@ -403,8 +402,7 @@ describe('Test multiple servers', function () {
403 }) 402 })
404 403
405 it('Should add the file 2 by asking server 1', async function () { 404 it('Should add the file 2 by asking server 1', async function () {
406 // Yes, this could be long 405 this.timeout(10000)
407 this.timeout(200000)
408 406
409 const res = await getVideosList(servers[0].url) 407 const res = await getVideosList(servers[0].url)
410 408
@@ -419,8 +417,7 @@ describe('Test multiple servers', function () {
419 }) 417 })
420 418
421 it('Should add the file 3 by asking server 2', async function () { 419 it('Should add the file 3 by asking server 2', async function () {
422 // Yes, this could be long 420 this.timeout(10000)
423 this.timeout(200000)
424 421
425 const res = await getVideosList(servers[1].url) 422 const res = await getVideosList(servers[1].url)
426 423
@@ -435,8 +432,7 @@ describe('Test multiple servers', function () {
435 }) 432 })
436 433
437 it('Should add the file 3-2 by asking server 1', async function () { 434 it('Should add the file 3-2 by asking server 1', async function () {
438 // Yes, this could be long 435 this.timeout(10000)
439 this.timeout(200000)
440 436
441 const res = await getVideosList(servers[0].url) 437 const res = await getVideosList(servers[0].url)
442 438
@@ -451,8 +447,7 @@ describe('Test multiple servers', function () {
451 }) 447 })
452 448
453 it('Should add the file 2 in 360p by asking server 1', async function () { 449 it('Should add the file 2 in 360p by asking server 1', async function () {
454 // Yes, this could be long 450 this.timeout(10000)
455 this.timeout(200000)
456 451
457 const res = await getVideosList(servers[0].url) 452 const res = await getVideosList(servers[0].url)
458 453
@@ -489,7 +484,7 @@ describe('Test multiple servers', function () {
489 }) 484 })
490 485
491 it('Should view multiple videos on owned servers', async function () { 486 it('Should view multiple videos on owned servers', async function () {
492 this.timeout(30000) 487 this.timeout(10000)
493 488
494 const tasks: Promise<any>[] = [] 489 const tasks: Promise<any>[] = []
495 tasks.push(getVideo(servers[2].url, localVideosServer3[0])) 490 tasks.push(getVideo(servers[2].url, localVideosServer3[0]))
@@ -499,7 +494,7 @@ describe('Test multiple servers', function () {
499 494
500 await Promise.all(tasks) 495 await Promise.all(tasks)
501 496
502 await wait(22000) 497 await wait(5000)
503 498
504 for (const server of servers) { 499 for (const server of servers) {
505 const res = await getVideosList(server.url) 500 const res = await getVideosList(server.url)
@@ -514,7 +509,7 @@ describe('Test multiple servers', function () {
514 }) 509 })
515 510
516 it('Should view multiple videos on each servers', async function () { 511 it('Should view multiple videos on each servers', async function () {
517 this.timeout(30000) 512 this.timeout(15000)
518 513
519 const tasks: Promise<any>[] = [] 514 const tasks: Promise<any>[] = []
520 tasks.push(getVideo(servers[0].url, remoteVideosServer1[0])) 515 tasks.push(getVideo(servers[0].url, remoteVideosServer1[0]))
@@ -530,7 +525,7 @@ describe('Test multiple servers', function () {
530 525
531 await Promise.all(tasks) 526 await Promise.all(tasks)
532 527
533 await wait(22000) 528 await wait(10000)
534 529
535 let baseVideos = null 530 let baseVideos = null
536 531
@@ -553,7 +548,7 @@ describe('Test multiple servers', function () {
553 }) 548 })
554 549
555 it('Should like and dislikes videos on different services', async function () { 550 it('Should like and dislikes videos on different services', async function () {
556 this.timeout(30000) 551 this.timeout(20000)
557 552
558 const tasks: Promise<any>[] = [] 553 const tasks: Promise<any>[] = []
559 tasks.push(rateVideo(servers[0].url, servers[0].accessToken, remoteVideosServer1[0], 'like')) 554 tasks.push(rateVideo(servers[0].url, servers[0].accessToken, remoteVideosServer1[0], 'like'))
@@ -566,7 +561,7 @@ describe('Test multiple servers', function () {
566 561
567 await Promise.all(tasks) 562 await Promise.all(tasks)
568 563
569 await wait(22000) 564 await wait(10000)
570 565
571 let baseVideos = null 566 let baseVideos = null
572 for (const server of servers) { 567 for (const server of servers) {
@@ -591,7 +586,7 @@ describe('Test multiple servers', function () {
591 586
592 describe('Should manipulate these videos', function () { 587 describe('Should manipulate these videos', function () {
593 it('Should update the video 3 by asking server 3', async function () { 588 it('Should update the video 3 by asking server 3', async function () {
594 this.timeout(15000) 589 this.timeout(10000)
595 590
596 const attributes = { 591 const attributes = {
597 name: 'my super video updated', 592 name: 'my super video updated',
@@ -605,11 +600,11 @@ describe('Test multiple servers', function () {
605 600
606 await updateVideo(servers[2].url, servers[2].accessToken, toRemove[0].id, attributes) 601 await updateVideo(servers[2].url, servers[2].accessToken, toRemove[0].id, attributes)
607 602
608 await wait(11000) 603 await wait(5000)
609 }) 604 })
610 605
611 it('Should have the video 3 updated on each server', async function () { 606 it('Should have the video 3 updated on each server', async function () {
612 this.timeout(200000) 607 this.timeout(10000)
613 608
614 for (const server of servers) { 609 for (const server of servers) {
615 const res = await getVideosList(server.url) 610 const res = await getVideosList(server.url)
@@ -651,12 +646,12 @@ describe('Test multiple servers', function () {
651 }) 646 })
652 647
653 it('Should remove the videos 3 and 3-2 by asking server 3', async function () { 648 it('Should remove the videos 3 and 3-2 by asking server 3', async function () {
654 this.timeout(15000) 649 this.timeout(10000)
655 650
656 await removeVideo(servers[2].url, servers[2].accessToken, toRemove[0].id) 651 await removeVideo(servers[2].url, servers[2].accessToken, toRemove[0].id)
657 await removeVideo(servers[2].url, servers[2].accessToken, toRemove[1].id) 652 await removeVideo(servers[2].url, servers[2].accessToken, toRemove[1].id)
658 653
659 await wait(11000) 654 await wait(5000)
660 }) 655 })
661 656
662 it('Should have videos 1 and 3 on each server', async function () { 657 it('Should have videos 1 and 3 on each server', async function () {