+ it('Should upload many videos on server 1', async function () {
+ this.timeout(120000)
+
+ for (let i = 0; i < 10; i++) {
+ const uuid = (await uploadVideoAndGetId({ server: servers[0], videoName: 'video ' + i })).uuid
+ videoIdsServer1.push(uuid)
+ }
+
+ await waitJobs(servers)
+
+ for (const id of videoIdsServer1) {
+ await getVideo(servers[1].url, id)
+ }
+
+ await waitJobs(servers)
+ await setActorFollowScores(servers[1].internalServerNumber, 20)
+
+ // Wait video expiration
+ await wait(11000)
+
+ // Refresh video -> score + 10 = 30
+ await getVideo(servers[1].url, videoIdsServer1[0])
+
+ await waitJobs(servers)
+ })
+
+ it('Should remove followings that are down', async function () {
+ this.timeout(120000)
+
+ killallServers([ servers[0] ])
+
+ // Wait video expiration
+ await wait(11000)
+
+ for (let i = 0; i < 5; i++) {
+ try {
+ await getVideo(servers[1].url, videoIdsServer1[i])
+ await waitJobs([ servers[1] ])
+ await wait(1500)
+ } catch {}
+ }
+
+ for (const id of videoIdsServer1) {
+ await getVideo(servers[1].url, id, HttpStatusCode.FORBIDDEN_403)
+ }
+ })
+