+ await checkStatsWith1Redundancy(strategy)
+ })
+
+ it('Should remove the video and the redundancy files', async function () {
+ this.timeout(20000)
+
+ await removeVideo(servers[1].url, servers[1].accessToken, video1Server2UUID)
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ await checkVideoFilesWereRemoved(video1Server2UUID, server)
+ }
+ })
+
+ after(async function () {
+ await cleanupTests(servers)
+ })
+ })
+
+ describe('With only HLS files', function () {
+ const strategy = 'recently-added'
+
+ before(async function () {
+ this.timeout(120000)
+
+ await flushAndRunServers(strategy, { min_views: 3 }, false)
+ })
+
+ it('Should have 0 playlist redundancy on the first video', async function () {
+ await check1WebSeed()
+ await check0PlaylistRedundancies()
+ })
+
+ it('Should enable redundancy on server 1', function () {
+ return enableRedundancyOnServer1()
+ })
+
+ it('Should still have 0 redundancy on the first video', async function () {
+ this.timeout(80000)
+
+ await waitJobs(servers)
+ await wait(15000)
+ await waitJobs(servers)
+
+ await check0PlaylistRedundancies()
+ await checkStatsWithoutRedundancy(strategy)
+ })
+
+ it('Should have 1 redundancy on the first video', async function () {
+ this.timeout(160000)
+
+ await viewVideo(servers[0].url, video1Server2UUID)
+ await viewVideo(servers[2].url, video1Server2UUID)
+
+ await wait(10000)
+ await waitJobs(servers)
+
+ await waitJobs(servers)
+ await servers[0].serversCommand.waitUntilLog('Duplicated ', 1)
+ await waitJobs(servers)
+
+ await check1PlaylistRedundancies()
+ await checkStatsWith1Redundancy(strategy, true)