diff --git a/packages/tests/src/api/activitypub/cleaner.ts b/packages/tests/src/api/activitypub/cleaner.ts index 4476aea85..20415b9a4 100644 --- a/packages/tests/src/api/activitypub/cleaner.ts +++ b/packages/tests/src/api/activitypub/cleaner.ts @@ -23,7 +23,7 @@ describe('Test AP cleaner', function () { let videoUUIDs: string[] before(async function () { - this.timeout(120000) + this.timeout(240000) const config = { federation: { diff --git a/packages/tests/src/api/moderation/abuses.ts b/packages/tests/src/api/moderation/abuses.ts index 649de224e..68f759435 100644 --- a/packages/tests/src/api/moderation/abuses.ts +++ b/packages/tests/src/api/moderation/abuses.ts @@ -21,7 +21,7 @@ describe('Test abuses', function () { let commands: AbusesCommand[] before(async function () { - this.timeout(50000) + this.timeout(120000) // Run servers servers = await createMultipleServers(2) diff --git a/packages/tests/src/api/transcoding/transcoder.ts b/packages/tests/src/api/transcoding/transcoder.ts index bce525fb0..dd4948ee6 100644 --- a/packages/tests/src/api/transcoding/transcoder.ts +++ b/packages/tests/src/api/transcoding/transcoder.ts @@ -234,7 +234,7 @@ describe('Test video transcoding', function () { describe('Audio transcoding', function () { it('Should transcode high bit rate mp3 to proper bit rate', async function () { - this.timeout(60_000) + this.timeout(120_000) const attributes = { name: 'mp3_256k', @@ -266,7 +266,7 @@ describe('Test video transcoding', function () { }) it('Should transcode video with no audio and have no audio itself', async function () { - this.timeout(60_000) + this.timeout(120_000) const attributes = { name: 'no_audio', @@ -290,7 +290,7 @@ describe('Test video transcoding', function () { }) it('Should leave the audio untouched, but properly transcode the video', async function () { - this.timeout(60_000) + this.timeout(120_000) const attributes = { name: 'untouched_audio', diff --git a/packages/tests/src/api/videos/video-channels.ts b/packages/tests/src/api/videos/video-channels.ts index 531c41e18..c431fc0eb 100644 --- a/packages/tests/src/api/videos/video-channels.ts +++ b/packages/tests/src/api/videos/video-channels.ts @@ -523,7 +523,7 @@ describe('Test video channels', function () { }) it('Should list channels by updatedAt desc if a video has been uploaded', async function () { - this.timeout(30000) + this.timeout(60000) await servers[0].videos.upload({ attributes: { channelId: totoChannel } }) await waitJobs(servers) diff --git a/packages/tests/src/api/videos/video-playlists.ts b/packages/tests/src/api/videos/video-playlists.ts index 77c8d6436..18fc21e19 100644 --- a/packages/tests/src/api/videos/video-playlists.ts +++ b/packages/tests/src/api/videos/video-playlists.ts @@ -537,7 +537,7 @@ describe('Test video playlists', function () { describe('Element timestamps', function () { it('Should create a playlist containing different startTimestamp/endTimestamp videos', async function () { - this.timeout(30000) + this.timeout(120000) const addVideo = (attributes: any) => { return commands[0].addElement({ playlistId: playlistServer1Id, attributes }) diff --git a/packages/tests/src/api/videos/video-source.ts b/packages/tests/src/api/videos/video-source.ts index cbde5c4b2..3a13f7279 100644 --- a/packages/tests/src/api/videos/video-source.ts +++ b/packages/tests/src/api/videos/video-source.ts @@ -26,7 +26,7 @@ describe('Test a video file replacement', function () { let uuid: string before(async function () { - this.timeout(50000) + this.timeout(120000) servers = await createMultipleServers(2) @@ -111,7 +111,7 @@ describe('Test a video file replacement', function () { }) it('Should replace a video file with transcoding enabled', async function () { - this.timeout(120000) + this.timeout(240000) const previousPaths: string[] = [] @@ -384,7 +384,7 @@ describe('Test a video file replacement', function () { }) it('Should replace a video file with transcoding enabled', async function () { - this.timeout(120000) + this.timeout(240000) const previousPaths: string[] = [] diff --git a/packages/tests/src/api/videos/video-storyboard.ts b/packages/tests/src/api/videos/video-storyboard.ts index 7d156aa7f..39890e3ea 100644 --- a/packages/tests/src/api/videos/video-storyboard.ts +++ b/packages/tests/src/api/videos/video-storyboard.ts @@ -139,7 +139,7 @@ describe('Test video storyboard', function () { }) it('Should generate a storyboard after torrent import', async function () { - this.timeout(120000) + this.timeout(240000) if (areHttpImportTestsDisabled()) return diff --git a/packages/tests/src/shared/views.ts b/packages/tests/src/shared/views.ts index b791eff25..8d0fa567d 100644 --- a/packages/tests/src/shared/views.ts +++ b/packages/tests/src/shared/views.ts @@ -35,17 +35,8 @@ async function prepareViewsServers () { await setAccessTokensToServers(servers) await setDefaultVideoChannel(servers) - await servers[0].config.updateCustomSubConfig({ - newConfig: { - live: { - enabled: true, - allowReplay: true, - transcoding: { - enabled: false - } - } - } - }) + await servers[0].config.enableMinimumTranscoding() + await servers[0].config.enableLive({ allowReplay: true, transcoding: false }) await doubleFollow(servers[0], servers[1]) diff --git a/server/core/lib/job-queue/job-queue.ts b/server/core/lib/job-queue/job-queue.ts index 0f642446b..7922a830b 100644 --- a/server/core/lib/job-queue/job-queue.ts +++ b/server/core/lib/job-queue/job-queue.ts @@ -418,7 +418,11 @@ class JobQueue { continue } - const jobs = await queue.getJobs(states, 0, start + count, asc) + let jobs = await queue.getJobs(states, 0, start + count, asc) + + // FIXME: we have sometimes undefined values https://github.com/taskforcesh/bullmq/issues/248 + jobs = jobs.filter(j => !!j) + results = results.concat(jobs) }