Try to fix live test
This commit is contained in:
parent
7fd03a2c8f
commit
0e856b78e9
|
@ -39,6 +39,7 @@ import {
|
|||
viewVideo,
|
||||
wait,
|
||||
waitJobs,
|
||||
waitUntilLiveEnded,
|
||||
waitUntilLivePublished,
|
||||
waitUntilLiveStarts,
|
||||
waitUntilLog
|
||||
|
@ -587,6 +588,8 @@ describe('Test live', function () {
|
|||
}
|
||||
|
||||
await stopFfmpeg(command)
|
||||
await waitUntilLiveEnded(servers[0].url, servers[0].accessToken, liveVideoUUID)
|
||||
|
||||
await waitJobs(servers)
|
||||
|
||||
for (const stateChanges of [ localStateChanges, remoteStateChanges ]) {
|
||||
|
|
|
@ -137,6 +137,10 @@ function waitUntilLivePublished (url: string, token: string, videoId: number | s
|
|||
return waitWhileLiveState(url, token, videoId, VideoState.PUBLISHED)
|
||||
}
|
||||
|
||||
function waitUntilLiveEnded (url: string, token: string, videoId: number | string) {
|
||||
return waitWhileLiveState(url, token, videoId, VideoState.LIVE_ENDED)
|
||||
}
|
||||
|
||||
async function waitWhileLiveState (url: string, token: string, videoId: number | string, state: VideoState) {
|
||||
let video: VideoDetails
|
||||
|
||||
|
@ -185,6 +189,7 @@ export {
|
|||
checkLiveCleanup,
|
||||
stopFfmpeg,
|
||||
sendRTMPStreamInVideo,
|
||||
waitUntilLiveEnded,
|
||||
waitFfmpegUntilError,
|
||||
sendRTMPStream,
|
||||
testFfmpegStreamError
|
||||
|
|
Loading…
Reference in New Issue