aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/utils')
-rw-r--r--server/tests/utils/server/jobs.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/tests/utils/server/jobs.ts b/server/tests/utils/server/jobs.ts
index c9cb8d3a3..4c02cace5 100644
--- a/server/tests/utils/server/jobs.ts
+++ b/server/tests/utils/server/jobs.ts
@@ -1,5 +1,5 @@
1import * as request from 'supertest' 1import * as request from 'supertest'
2import { JobState } from '../../../../shared/models' 2import { Job, JobState } from '../../../../shared/models'
3import { ServerInfo, wait } from '../index' 3import { ServerInfo, wait } from '../index'
4 4
5function getJobsList (url: string, accessToken: string, state: JobState) { 5function getJobsList (url: string, accessToken: string, state: JobState) {
@@ -44,8 +44,10 @@ async function waitJobs (serversArg: ServerInfo[] | ServerInfo) {
44 for (const server of servers) { 44 for (const server of servers) {
45 for (const state of states) { 45 for (const state of states) {
46 const p = getJobsListPaginationAndSort(server.url, server.accessToken, state, 0, 10, '-createdAt') 46 const p = getJobsListPaginationAndSort(server.url, server.accessToken, state, 0, 10, '-createdAt')
47 .then(res => { 47 .then(res => res.body.data)
48 if (res.body.total > 0) pendingRequests = true 48 .then((jobs: Job[]) => jobs.filter(j => j.type !== 'videos-views'))
49 .then(jobs => {
50 if (jobs.length !== 0) pendingRequests = true
49 }) 51 })
50 tasks.push(p) 52 tasks.push(p)
51 } 53 }