aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/multiple-servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r--server/tests/api/videos/multiple-servers.ts40
1 files changed, 21 insertions, 19 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index a9df262dc..84c1515a3 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -504,21 +504,22 @@ describe('Test multiple servers', function () {
504 it('Should view multiple videos on owned servers', async function () { 504 it('Should view multiple videos on owned servers', async function () {
505 this.timeout(30000) 505 this.timeout(30000)
506 506
507 await servers[2].videos.view({ id: localVideosServer3[0] }) 507 await servers[2].views.simulateView({ id: localVideosServer3[0] })
508 await wait(1000) 508 await wait(1000)
509 509
510 await servers[2].videos.view({ id: localVideosServer3[0] }) 510 await servers[2].views.simulateView({ id: localVideosServer3[0] })
511 await servers[2].videos.view({ id: localVideosServer3[1] }) 511 await servers[2].views.simulateView({ id: localVideosServer3[1] })
512 512
513 await wait(1000) 513 await wait(1000)
514 514
515 await servers[2].videos.view({ id: localVideosServer3[0] }) 515 await servers[2].views.simulateView({ id: localVideosServer3[0] })
516 await servers[2].videos.view({ id: localVideosServer3[0] }) 516 await servers[2].views.simulateView({ id: localVideosServer3[0] })
517 517
518 await waitJobs(servers) 518 await waitJobs(servers)
519 519
520 // Wait the repeatable job 520 for (const server of servers) {
521 await wait(6000) 521 await server.debug.sendCommand({ body: { command: 'process-video-views-buffer' } })
522 }
522 523
523 await waitJobs(servers) 524 await waitJobs(servers)
524 525
@@ -537,23 +538,24 @@ describe('Test multiple servers', function () {
537 this.timeout(45000) 538 this.timeout(45000)
538 539
539 const tasks: Promise<any>[] = [] 540 const tasks: Promise<any>[] = []
540 tasks.push(servers[0].videos.view({ id: remoteVideosServer1[0] })) 541 tasks.push(servers[0].views.simulateView({ id: remoteVideosServer1[0] }))
541 tasks.push(servers[1].videos.view({ id: remoteVideosServer2[0] })) 542 tasks.push(servers[1].views.simulateView({ id: remoteVideosServer2[0] }))
542 tasks.push(servers[1].videos.view({ id: remoteVideosServer2[0] })) 543 tasks.push(servers[1].views.simulateView({ id: remoteVideosServer2[0] }))
543 tasks.push(servers[2].videos.view({ id: remoteVideosServer3[0] })) 544 tasks.push(servers[2].views.simulateView({ id: remoteVideosServer3[0] }))
544 tasks.push(servers[2].videos.view({ id: remoteVideosServer3[1] })) 545 tasks.push(servers[2].views.simulateView({ id: remoteVideosServer3[1] }))
545 tasks.push(servers[2].videos.view({ id: remoteVideosServer3[1] })) 546 tasks.push(servers[2].views.simulateView({ id: remoteVideosServer3[1] }))
546 tasks.push(servers[2].videos.view({ id: remoteVideosServer3[1] })) 547 tasks.push(servers[2].views.simulateView({ id: remoteVideosServer3[1] }))
547 tasks.push(servers[2].videos.view({ id: localVideosServer3[1] })) 548 tasks.push(servers[2].views.simulateView({ id: localVideosServer3[1] }))
548 tasks.push(servers[2].videos.view({ id: localVideosServer3[1] })) 549 tasks.push(servers[2].views.simulateView({ id: localVideosServer3[1] }))
549 tasks.push(servers[2].videos.view({ id: localVideosServer3[1] })) 550 tasks.push(servers[2].views.simulateView({ id: localVideosServer3[1] }))
550 551
551 await Promise.all(tasks) 552 await Promise.all(tasks)
552 553
553 await waitJobs(servers) 554 await waitJobs(servers)
554 555
555 // Wait the repeatable job 556 for (const server of servers) {
556 await wait(16000) 557 await server.debug.sendCommand({ body: { command: 'process-video-views-buffer' } })
558 }
557 559
558 await waitJobs(servers) 560 await waitJobs(servers)
559 561