From 59fd824cf3434a8417b73230f1840fed327e3495 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 11 Dec 2020 10:36:05 +0100 Subject: Fix tests timeout --- shared/extra-utils/videos/live.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils/videos') diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts index cbcfc09e4..98f67a9bb 100644 --- a/shared/extra-utils/videos/live.ts +++ b/shared/extra-utils/videos/live.ts @@ -119,7 +119,7 @@ async function testFfmpegStreamError (command: ffmpeg.FfmpegCommand, shouldHaveE let error: Error try { - await waitFfmpegUntilError(command, 15000) + await waitFfmpegUntilError(command, 25000) } catch (err) { error = err } @@ -140,6 +140,10 @@ function waitUntilLivePublished (url: string, token: string, videoId: number | s return waitUntilLiveState(url, token, videoId, VideoState.PUBLISHED) } +function waitUntilLiveWaiting (url: string, token: string, videoId: number | string) { + return waitUntilLiveState(url, token, videoId, VideoState.WAITING_FOR_LIVE) +} + function waitUntilLiveEnded (url: string, token: string, videoId: number | string) { return waitUntilLiveState(url, token, videoId, VideoState.LIVE_ENDED) } @@ -206,6 +210,7 @@ export { checkLiveCleanup, waitUntilLiveSegmentGeneration, stopFfmpeg, + waitUntilLiveWaiting, sendRTMPStreamInVideo, waitUntilLiveEnded, waitFfmpegUntilError, -- cgit v1.2.3