aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/multiple-servers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-23 16:39:51 +0100
committerChocobozzz <me@florianbigard.com>2018-02-23 16:44:37 +0100
commitb5c0e95544cec5a33cee3df41c1607d2a0cd5403 (patch)
tree38a5db1faed107f7b75583c32125152812594821 /server/tests/api/videos/multiple-servers.ts
parente3bb78a2134a5e5755b6dbd8987894572ca31269 (diff)
downloadPeerTube-b5c0e95544cec5a33cee3df41c1607d2a0cd5403.tar.gz
PeerTube-b5c0e95544cec5a33cee3df41c1607d2a0cd5403.tar.zst
PeerTube-b5c0e95544cec5a33cee3df41c1607d2a0cd5403.zip
Avoids easy cheating on vidoe views
Diffstat (limited to 'server/tests/api/videos/multiple-servers.ts')
-rw-r--r--server/tests/api/videos/multiple-servers.ts17
1 files changed, 12 insertions, 5 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index c82ac1348..27c4c30b8 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -421,15 +421,22 @@ describe('Test multiple servers', function () {
421 }) 421 })
422 422
423 it('Should view multiple videos on owned servers', async function () { 423 it('Should view multiple videos on owned servers', async function () {
424 this.timeout(10000) 424 this.timeout(15000)
425 425
426 const tasks: Promise<any>[] = [] 426 const tasks: Promise<any>[] = []
427 tasks.push(viewVideo(servers[2].url, localVideosServer3[0])) 427 await viewVideo(servers[2].url, localVideosServer3[0])
428 tasks.push(viewVideo(servers[2].url, localVideosServer3[0])) 428 await viewVideo(servers[2].url, localVideosServer3[0])
429 tasks.push(viewVideo(servers[2].url, localVideosServer3[0])) 429 await viewVideo(servers[2].url, localVideosServer3[0])
430 tasks.push(viewVideo(servers[2].url, localVideosServer3[1])) 430 await viewVideo(servers[2].url, localVideosServer3[1])
431 431
432 await Promise.all(tasks) 432 await Promise.all(tasks)
433 await wait(1500)
434
435 await viewVideo(servers[2].url, localVideosServer3[0])
436
437 await wait(1500)
438
439 await viewVideo(servers[2].url, localVideosServer3[0])
433 440
434 await wait(5000) 441 await wait(5000)
435 442