]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/live/live-permanent.ts
Fix tests timeout
[github/Chocobozzz/PeerTube.git] / server / tests / api / live / live-permanent.ts
index 54e4010e9a50792e6f1a32ec37a0d41b237da816..9e6c6cf70fe0ff9baa49c1f17dc68001eca1cb71 100644 (file)
@@ -20,7 +20,8 @@ import {
   updateLive,
   wait,
   waitJobs,
-  waitUntilLiveStarts
+  waitUntilLivePublished,
+  waitUntilLiveWaiting
 } from '../../../../shared/extra-utils'
 
 const expect = chai.expect
@@ -111,17 +112,18 @@ describe('Permenant live', function () {
   })
 
   it('Should stream into this permanent live', async function () {
-    this.timeout(40000)
+    this.timeout(60000)
 
     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)
   })
@@ -171,7 +173,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)