+ const childOfChildOfChildOfFirstChild = childOfChildFirstChild.children[0]
+ expect(childOfChildOfChildOfFirstChild.comment.text).to.equal('comment 1-4')
+ expect(childOfChildOfChildOfFirstChild.children).to.have.lengthOf(0)
+ })
+
+ it('Should upload many videos on server 1', async function () {
+ this.timeout(240000)
+
+ for (let i = 0; i < 10; i++) {
+ const uuid = (await servers[0].videos.quickUpload({ name: 'video ' + i })).uuid
+ videoIdsServer1.push(uuid)
+ }
+
+ await waitJobs(servers)
+
+ for (const id of videoIdsServer1) {
+ await servers[1].videos.get({ id })
+ }
+
+ await waitJobs(servers)
+ await sqlCommands[1].setActorFollowScores(20)
+
+ // Wait video expiration
+ await wait(11000)
+
+ // Refresh video -> score + 10 = 30
+ await servers[1].videos.get({ id: videoIdsServer1[0] })
+
+ await waitJobs(servers)
+ })
+
+ it('Should remove followings that are down', async function () {
+ this.timeout(120000)
+
+ await killallServers([ servers[0] ])
+
+ // Wait video expiration
+ await wait(11000)
+
+ for (let i = 0; i < 5; i++) {
+ try {
+ await servers[1].videos.get({ id: videoIdsServer1[i] })
+ await waitJobs([ servers[1] ])
+ await wait(1500)
+ } catch {}
+ }
+
+ for (const id of videoIdsServer1) {
+ await servers[1].videos.get({ id, expectedStatus: HttpStatusCode.FORBIDDEN_403 })