1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Fix tests

This commit is contained in:
Chocobozzz 2021-02-19 11:23:51 +01:00
parent 2a021e6cb6
commit 300cb723eb
No known key found for this signature in database
GPG key ID: 583A612D890159BE
2 changed files with 12 additions and 3 deletions

View file

@ -20,7 +20,8 @@ import {
updateUser,
userLogin,
wait,
waitJobs
waitJobs,
waitUntilLivePublished
} from '../../../../shared/extra-utils'
const expect = chai.expect
@ -55,6 +56,12 @@ describe('Test live constraints', function () {
await checkLiveCleanup(servers[0], videoId, resolutions)
}
async function waitUntilLivePublishedOnAllServers (videoId: string) {
for (const server of servers) {
await waitUntilLivePublished(server.url, server.accessToken, videoId)
}
}
before(async function () {
this.timeout(120000)
@ -118,6 +125,7 @@ describe('Test live constraints', function () {
const userVideoLiveoId = await createLiveWrapper(true)
await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId)
@ -140,6 +148,7 @@ describe('Test live constraints', function () {
const userVideoLiveoId = await createLiveWrapper(true)
await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId)
@ -189,6 +198,7 @@ describe('Test live constraints', function () {
const userVideoLiveoId = await createLiveWrapper(true)
await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240 ])