]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Try to debug a CI issue
authorChocobozzz <me@florianbigard.com>
Tue, 3 Jan 2023 13:52:35 +0000 (14:52 +0100)
committerChocobozzz <me@florianbigard.com>
Tue, 3 Jan 2023 13:52:35 +0000 (14:52 +0100)
server/tests/api/live/live-fast-restream.ts

index 63a69e591f76801323f22afad28f6a1a03d55400..f6959b83cf6519c43794c7d9956afcfd1191acaf 100644 (file)
@@ -78,9 +78,15 @@ describe('Fast restream in live', function () {
       const video = await server.videos.get({ id: liveId })
       expect(video.streamingPlaylists).to.have.lengthOf(1)
 
-      await server.live.getSegmentFile({ videoUUID: liveId, segment: 0, playlistNumber: 0 })
-      await makeRawRequest({ url: video.streamingPlaylists[0].playlistUrl, expectedStatus: HttpStatusCode.OK_200 })
-      await makeRawRequest({ url: video.streamingPlaylists[0].segmentsSha256Url, expectedStatus: HttpStatusCode.OK_200 })
+      try {
+        await server.live.getSegmentFile({ videoUUID: liveId, segment: 0, playlistNumber: 0 })
+        await makeRawRequest({ url: video.streamingPlaylists[0].playlistUrl, expectedStatus: HttpStatusCode.OK_200 })
+        await makeRawRequest({ url: video.streamingPlaylists[0].segmentsSha256Url, expectedStatus: HttpStatusCode.OK_200 })
+      } catch (err) {
+        // FIXME: try to debug error in CI "Unexpected end of JSON input"
+        console.error(err)
+        throw err
+      }
 
       await wait(100)
     }