Fix tests

This commit is contained in:
Chocobozzz
2025-12-02 09:05:01 +01:00
parent 896005dadf
commit e0232628de

View File

@@ -71,18 +71,15 @@ describe('Test transcription in peertube-runner program', function () {
it('Should not run transcription on video without audio stream', async function () {
this.timeout(360000)
const now = new Date()
const uuid = await uploadForTranscription(servers[0], { fixture: 'video_short_no_audio.mp4' })
await waitJobs(servers)
let continueWhile = true
while (continueWhile) {
await wait(500)
const { data } = await servers[0].runnerJobs.list({ stateOneOf: [ RunnerJobState.ERRORED ] })
continueWhile = !data.some(j => j.type === 'video-transcription')
}
const { data } = await servers[0].runnerJobs.list({ stateOneOf: [ RunnerJobState.ERRORED ] })
const job = data.some(j => j.type === 'video-transcription' && new Date(j.createdAt) >= now)
expect(job).to.be.false
await checkNoCaption(servers, uuid)
await checkLanguage(servers, uuid, null)