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