aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/views/video-views-counter.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/views/video-views-counter.ts')
-rw-r--r--server/tests/api/views/video-views-counter.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/tests/api/views/video-views-counter.ts b/server/tests/api/views/video-views-counter.ts
index b68aaa350..b8969d52d 100644
--- a/server/tests/api/views/video-views-counter.ts
+++ b/server/tests/api/views/video-views-counter.ts
@@ -57,10 +57,11 @@ describe('Test video views/viewers counters', function () {
57 }) 57 })
58 58
59 it('Should not view again this video with the same IP', async function () { 59 it('Should not view again this video with the same IP', async function () {
60 await servers[0].views.simulateViewer({ id: videoUUID, currentTimes: [ 1, 4 ] }) 60 await servers[0].views.simulateViewer({ id: videoUUID, xForwardedFor: '0.0.0.1,127.0.0.1', currentTimes: [ 1, 4 ] })
61 await servers[0].views.simulateViewer({ id: videoUUID, xForwardedFor: '0.0.0.1,127.0.0.1', currentTimes: [ 1, 4 ] })
61 await processViewsBuffer(servers) 62 await processViewsBuffer(servers)
62 63
63 await checkCounter('views', videoUUID, 1) 64 await checkCounter('views', videoUUID, 2)
64 }) 65 })
65 66
66 it('Should view the video from server 2 and send the event', async function () { 67 it('Should view the video from server 2 and send the event', async function () {
@@ -68,7 +69,7 @@ describe('Test video views/viewers counters', function () {
68 await waitJobs(servers) 69 await waitJobs(servers)
69 await processViewsBuffer(servers) 70 await processViewsBuffer(servers)
70 71
71 await checkCounter('views', videoUUID, 2) 72 await checkCounter('views', videoUUID, 3)
72 }) 73 })
73 }) 74 })
74 75
@@ -78,7 +79,7 @@ describe('Test video views/viewers counters', function () {
78 let command: FfmpegCommand 79 let command: FfmpegCommand
79 80
80 before(async function () { 81 before(async function () {
81 this.timeout(60000); 82 this.timeout(120000);
82 83
83 ({ vodVideoId, liveVideoId, ffmpegCommand: command } = await prepareViewsVideos({ servers, live: true, vod: true })) 84 ({ vodVideoId, liveVideoId, ffmpegCommand: command } = await prepareViewsVideos({ servers, live: true, vod: true }))
84 }) 85 })