setAccessTokensToServers,
setDefaultVideoChannel,
waitJobs,
+ waitUntilLiveReplacedByReplayOnAllServers,
waitUntilLiveWaitingOnAllServers
} from '@shared/server-commands'
import { checkLiveCleanup } from '../../shared'
await checkLiveCleanup(servers[0], videoId, resolutions)
}
- async function waitUntilLivePublishedOnAllServers (videoId: string) {
- for (const server of servers) {
- await server.live.waitUntilPublished({ videoId })
- }
- }
-
function updateQuota (options: { total: number, daily: number }) {
return servers[0].users.update({
userId,
const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false })
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
- await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
+ await waitUntilLiveReplacedByReplayOnAllServers(servers, userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId)
const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false })
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
- await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
+ await waitUntilLiveReplacedByReplayOnAllServers(servers, userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId)
const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false })
await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true })
- await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
+ await waitUntilLiveReplacedByReplayOnAllServers(servers, userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240, 144 ])