diff options
Diffstat (limited to 'server/tests/api/videos/videos-views-cleaner.ts')
-rw-r--r-- | server/tests/api/videos/videos-views-cleaner.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts index c21d46d56..fbddd40f4 100644 --- a/server/tests/api/videos/videos-views-cleaner.ts +++ b/server/tests/api/videos/videos-views-cleaner.ts | |||
@@ -10,7 +10,7 @@ import { | |||
10 | flushAndRunServer, | 10 | flushAndRunServer, |
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs, cleanupTests | 13 | uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs, cleanupTests, closeAllSequelize |
14 | } from '../../../../shared/extra-utils' | 14 | } from '../../../../shared/extra-utils' |
15 | import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' | 15 | import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' |
16 | import { VideosOverview } from '../../../../shared/models/overviews' | 16 | import { VideosOverview } from '../../../../shared/models/overviews' |
@@ -58,14 +58,14 @@ describe('Test video views cleaner', function () { | |||
58 | 58 | ||
59 | { | 59 | { |
60 | for (const server of servers) { | 60 | for (const server of servers) { |
61 | const total = await countVideoViewsOf(server.serverNumber, videoIdServer1) | 61 | const total = await countVideoViewsOf(server.internalServerNumber, videoIdServer1) |
62 | expect(total).to.equal(2) | 62 | expect(total).to.equal(2) |
63 | } | 63 | } |
64 | } | 64 | } |
65 | 65 | ||
66 | { | 66 | { |
67 | for (const server of servers) { | 67 | for (const server of servers) { |
68 | const total = await countVideoViewsOf(server.serverNumber, videoIdServer2) | 68 | const total = await countVideoViewsOf(server.internalServerNumber, videoIdServer2) |
69 | expect(total).to.equal(2) | 69 | expect(total).to.equal(2) |
70 | } | 70 | } |
71 | } | 71 | } |
@@ -74,8 +74,6 @@ describe('Test video views cleaner', function () { | |||
74 | it('Should clean old video views', async function () { | 74 | it('Should clean old video views', async function () { |
75 | this.timeout(50000) | 75 | this.timeout(50000) |
76 | 76 | ||
77 | this.timeout(50000) | ||
78 | |||
79 | killallServers([ servers[0] ]) | 77 | killallServers([ servers[0] ]) |
80 | 78 | ||
81 | await reRunServer(servers[0], { views: { videos: { remote: { max_age: '5 seconds' } } } }) | 79 | await reRunServer(servers[0], { views: { videos: { remote: { max_age: '5 seconds' } } } }) |
@@ -86,21 +84,23 @@ describe('Test video views cleaner', function () { | |||
86 | 84 | ||
87 | { | 85 | { |
88 | for (const server of servers) { | 86 | for (const server of servers) { |
89 | const total = await countVideoViewsOf(server.serverNumber, videoIdServer1) | 87 | const total = await countVideoViewsOf(server.internalServerNumber, videoIdServer1) |
90 | expect(total).to.equal(2) | 88 | expect(total).to.equal(2) |
91 | } | 89 | } |
92 | } | 90 | } |
93 | 91 | ||
94 | { | 92 | { |
95 | const totalServer1 = await countVideoViewsOf(servers[0].serverNumber, videoIdServer2) | 93 | const totalServer1 = await countVideoViewsOf(servers[0].internalServerNumber, videoIdServer2) |
96 | expect(totalServer1).to.equal(0) | 94 | expect(totalServer1).to.equal(0) |
97 | 95 | ||
98 | const totalServer2 = await countVideoViewsOf(servers[1].serverNumber, videoIdServer2) | 96 | const totalServer2 = await countVideoViewsOf(servers[1].internalServerNumber, videoIdServer2) |
99 | expect(totalServer2).to.equal(2) | 97 | expect(totalServer2).to.equal(2) |
100 | } | 98 | } |
101 | }) | 99 | }) |
102 | 100 | ||
103 | after(async function () { | 101 | after(async function () { |
102 | await closeAllSequelize(servers) | ||
103 | |||
104 | await cleanupTests(servers) | 104 | await cleanupTests(servers) |
105 | }) | 105 | }) |
106 | }) | 106 | }) |