ActivityPub-federated video streaming platform using P2P directly in your web browser
More robust runner socket test
Chocobozzz15c230348991
diff --git a/server/tests/api/runners/runner-socket.ts b/server/tests/api/runners/runner-socket.tsindex df640f99c8..a77e57a115 100644--- a/server/tests/api/runners/runner-socket.ts+++ b/server/tests/api/runners/runner-socket.ts@@ -58,18 +58,20 @@ describe('Test runner socket', function () {localSocket.on('available-jobs', () => pings++)await server.videos.quickUpload({ name: 'video1' })-- // Wait for debounce- await wait(1000)await waitJobs([ server ])- expect(pings).to.equal(1)- await server.videos.quickUpload({ name: 'video2' })+ // eslint-disable-next-line no-unmodified-loop-condition+ while (pings !== 1) {+ await wait(500)+ }- // Wait for debounce- await wait(1000)+ await server.videos.quickUpload({ name: 'video2' })await waitJobs([ server ])- expect(pings).to.equal(2)++ // eslint-disable-next-line no-unmodified-loop-condition+ while ((pings as number) !== 2) {+ await wait(500)+ }await server.runnerJobs.cancelAllJobs()})@@ -80,18 +82,20 @@ describe('Test runner socket', function () {localSocket.on('available-jobs', () => pings++)await server.videos.quickUpload({ name: 'video3' })- // Wait for debounce- await wait(1000)await waitJobs([ server ])- expect(pings).to.equal(1)+ // eslint-disable-next-line no-unmodified-loop-condition+ while (pings !== 1) {+ await wait(500)+ }await server.runnerJobs.autoProcessWebVideoJob(runnerToken)- // Wait for debounce- await wait(1000)await waitJobs([ server ])- expect(pings).to.equal(2)+ // eslint-disable-next-line no-unmodified-loop-condition+ while ((pings as number) !== 2) {+ await wait(500)+ }})it('Should not send a ping if the ended job does not have a child', async function () {diff --git a/server/tests/api/videos/video-storyboard.ts b/server/tests/api/videos/video-storyboard.tsindex fc4b4450ff..07f371cad5 100644--- a/server/tests/api/videos/video-storyboard.ts+++ b/server/tests/api/videos/video-storyboard.ts@@ -63,7 +63,7 @@ describe('Test video storyboard', function () {})it('Should generate a storyboard after upload without transcoding', async function () {- this.timeout(60000)+ this.timeout(120000)// 5s videoconst { uuid } = await servers[0].videos.quickUpload({ name: 'upload', fixture: 'video_short.webm' })@@ -76,7 +76,7 @@ describe('Test video storyboard', function () {})it('Should generate a storyboard after upload without transcoding with a long video', async function () {- this.timeout(60000)+ this.timeout(120000)// 124s videoconst { uuid } = await servers[0].videos.quickUpload({ name: 'upload', fixture: 'video_very_long_10p.mp4' })@@ -88,7 +88,7 @@ describe('Test video storyboard', function () {})it('Should generate a storyboard after upload with transcoding', async function () {- this.timeout(60000)+ this.timeout(120000)await servers[0].config.enableMinimumTranscoding()@@ -102,7 +102,7 @@ describe('Test video storyboard', function () {})it('Should generate a storyboard after an audio upload', async function () {- this.timeout(60000)+ this.timeout(120000)// 6s audioconst attributes = { name: 'audio', fixture: 'sample.ogg' }@@ -119,7 +119,7 @@ describe('Test video storyboard', function () {})it('Should generate a storyboard after HTTP import', async function () {- this.timeout(60000)+ this.timeout(120000)if (areHttpImportTestsDisabled()) return@@ -139,7 +139,7 @@ describe('Test video storyboard', function () {})it('Should generate a storyboard after torrent import', async function () {- this.timeout(60000)+ this.timeout(120000)if (areHttpImportTestsDisabled()) return