X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Flive%2Flive-constraints.ts;h=5569e6066999a40f52d9ea4b22e2d55625809e36;hb=300cb723eb9bd219e6d381c57a8a6a860563bbbb;hp=257673b66b6a9d027e946c24893cbd485ab83778;hpb=ffc12d3ad5b832602b1098cd3d601feeb618af7c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts index 257673b66..5569e6066 100644 --- a/server/tests/api/live/live-constraints.ts +++ b/server/tests/api/live/live-constraints.ts @@ -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) @@ -179,6 +188,7 @@ describe('Test live constraints', function () { '480p': true, '720p': true, '1080p': true, + '1440p': true, '2160p': true } } @@ -188,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 ])