]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix runner vod transcoding error test
authorChocobozzz <me@florianbigard.com>
Fri, 26 May 2023 14:09:28 +0000 (16:09 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 26 May 2023 14:09:28 +0000 (16:09 +0200)
server/tests/api/runners/runner-vod-transcoding.ts

index 43e005bbee98d15ce529964029183b8ac32a9bda..d9da0f40deb725e45d13e4e1a2b1dfefc9d47adc 100644 (file)
@@ -98,10 +98,12 @@ describe('Test runner VOD transcoding', function () {
       const { availableJobs } = await servers[0].runnerJobs.request({ runnerToken })
       const jobUUID = availableJobs[0].uuid
 
-      const { job } = await servers[0].runnerJobs.accept({ runnerToken, jobUUID })
-      const jobToken = job.jobToken
+      for (let i = 0; i < 5; i++) {
+        const { job } = await servers[0].runnerJobs.accept({ runnerToken, jobUUID })
+        const jobToken = job.jobToken
 
-      await servers[0].runnerJobs.error({ runnerToken, jobUUID, jobToken, message: 'Error' })
+        await servers[0].runnerJobs.error({ runnerToken, jobUUID, jobToken, message: 'Error' })
+      }
 
       const video = await servers[0].videos.get({ id: uuid })
       expect(video.state.id).to.equal(VideoState.TRANSCODING_FAILED)