X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Flive%2Flive-permanent.ts;h=71b7d28a885c23232943468e8a017d7ecb2bced1;hb=693c6586cb896a84ff0f897b1c242bcf7bdcbaee;hp=54e4010e9a50792e6f1a32ec37a0d41b237da816;hpb=e26dc0cdbda13f8b65ab2be3a0e13e7ef5c4b98c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/live/live-permanent.ts b/server/tests/api/live/live-permanent.ts index 54e4010e9..71b7d28a8 100644 --- a/server/tests/api/live/live-permanent.ts +++ b/server/tests/api/live/live-permanent.ts @@ -8,6 +8,7 @@ import { createLive, doubleFollow, flushAndRunMultipleServers, + getCustomConfigResolutions, getLive, getPlaylistsCount, getVideo, @@ -20,12 +21,13 @@ import { updateLive, wait, waitJobs, - waitUntilLiveStarts + waitUntilLivePublished, + waitUntilLiveWaiting } from '../../../../shared/extra-utils' const expect = chai.expect -describe('Permenant live', function () { +describe('Permanent live', function () { let servers: ServerInfo[] = [] let videoUUID: string @@ -65,17 +67,10 @@ describe('Permenant live', function () { live: { enabled: true, allowReplay: true, - maxDuration: null, + maxDuration: -1, transcoding: { enabled: true, - resolutions: { - '240p': true, - '360p': true, - '480p': true, - '720p': true, - '1080p': true, - '2160p': true - } + resolutions: getCustomConfigResolutions(true) } } }) @@ -111,17 +106,18 @@ describe('Permenant live', function () { }) it('Should stream into this permanent live', async function () { - this.timeout(40000) + this.timeout(120000) const command = await sendRTMPStreamInVideo(servers[0].url, servers[0].accessToken, videoUUID) for (const server of servers) { - await waitUntilLiveStarts(server.url, server.accessToken, videoUUID) + await waitUntilLivePublished(server.url, server.accessToken, videoUUID) } await checkVideoState(videoUUID, VideoState.PUBLISHED) await stopFfmpeg(command) + await waitUntilLiveWaiting(servers[0].url, servers[0].accessToken, videoUUID) await waitJobs(servers) }) @@ -153,17 +149,10 @@ describe('Permenant live', function () { live: { enabled: true, allowReplay: true, - maxDuration: null, + maxDuration: -1, transcoding: { enabled: true, - resolutions: { - '240p': false, - '360p': false, - '480p': false, - '720p': false, - '1080p': false, - '2160p': false - } + resolutions: getCustomConfigResolutions(false) } } }) @@ -171,7 +160,7 @@ describe('Permenant live', function () { const command = await sendRTMPStreamInVideo(servers[0].url, servers[0].accessToken, videoUUID) for (const server of servers) { - await waitUntilLiveStarts(server.url, server.accessToken, videoUUID) + await waitUntilLivePublished(server.url, server.accessToken, videoUUID) } await checkVideoState(videoUUID, VideoState.PUBLISHED)