testFfmpegStreamError,
updateCustomSubConfig,
updateVideo,
+ wait,
waitJobs,
waitUntilLiveEnded,
- waitUntilLivePublished
+ waitUntilLivePublished,
+ waitUntilLiveSaved
} from '../../../../shared/extra-utils'
const expect = chai.expect
}
}
+ async function waitUntilLiveSavedOnAllServers (videoId: string) {
+ for (const server of servers) {
+ await waitUntilLiveSaved(server.url, server.accessToken, videoId)
+ }
+ }
+
before(async function () {
this.timeout(120000)
await checkVideosExist(liveVideoUUID, false, HttpStatusCode.OK_200)
await checkVideoState(liveVideoUUID, VideoState.LIVE_ENDED)
- await waitJobs(servers)
-
// No resolutions saved since we did not save replay
await checkLiveCleanup(servers[0], liveVideoUUID, [])
})
await getVideo(servers[0].url, liveVideoUUID, HttpStatusCode.UNAUTHORIZED_401)
await getVideo(servers[1].url, liveVideoUUID, HttpStatusCode.NOT_FOUND_404)
+ await wait(5000)
+ await waitJobs(servers)
await checkLiveCleanup(servers[0], liveVideoUUID, [])
})
removeVideo(servers[0].url, servers[0].accessToken, liveVideoUUID)
])
+ await wait(5000)
await waitJobs(servers)
await checkVideosExist(liveVideoUUID, false, HttpStatusCode.NOT_FOUND_404)
await stopFfmpeg(ffmpegCommand)
+ await waitUntilLiveSavedOnAllServers(liveVideoUUID)
await waitJobs(servers)
// Live has been transcoded
await getVideo(servers[0].url, liveVideoUUID, HttpStatusCode.UNAUTHORIZED_401)
await getVideo(servers[1].url, liveVideoUUID, HttpStatusCode.NOT_FOUND_404)
+ await wait(5000)
+ await waitJobs(servers)
await checkLiveCleanup(servers[0], liveVideoUUID, [ 720 ])
})
testFfmpegStreamError(ffmpegCommand, true)
])
+ await wait(5000)
await waitJobs(servers)
await checkVideosExist(liveVideoUUID, false, HttpStatusCode.NOT_FOUND_404)