Fix tests
This commit is contained in:
parent
f86ff3a026
commit
e901579b00
|
@ -257,7 +257,8 @@ const JOB_REMOVAL_OPTIONS = {
|
|||
const VIDEO_IMPORT_TIMEOUT = Math.floor(JOB_TTL['video-import'] * 0.9)
|
||||
|
||||
const RUNNER_JOBS = {
|
||||
MAX_FAILURES: 5
|
||||
MAX_FAILURES: 5,
|
||||
LAST_CONTACT_UPDATE_INTERVAL: 30000
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -1034,6 +1035,8 @@ if (process.env.PRODUCTION_CONSTANTS !== 'true') {
|
|||
VIDEO_LIVE.SEGMENT_TIME_SECONDS.DEFAULT_LATENCY = 2
|
||||
VIDEO_LIVE.SEGMENT_TIME_SECONDS.SMALL_LATENCY = 1
|
||||
VIDEO_LIVE.EDGE_LIVE_DELAY_SEGMENTS_NOTIFICATION = 1
|
||||
|
||||
RUNNER_JOBS.LAST_CONTACT_UPDATE_INTERVAL = 2000
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import { retryTransactionWrapper } from '@server/helpers/database-utils'
|
|||
import { logger, loggerTagsFactory } from '@server/helpers/logger'
|
||||
import { sequelizeTypescript } from '@server/initializers/database'
|
||||
import { MRunner } from '@server/types/models/runners'
|
||||
import { RUNNER_JOBS } from '@server/initializers/constants'
|
||||
|
||||
const lTags = loggerTagsFactory('runner')
|
||||
|
||||
|
@ -12,7 +13,7 @@ function updateLastRunnerContact (req: express.Request, runner: MRunner) {
|
|||
const now = new Date()
|
||||
|
||||
// Don't update last runner contact too often
|
||||
if (now.getTime() - runner.lastContact.getTime() < 30000) return
|
||||
if (now.getTime() - runner.lastContact.getTime() < RUNNER_JOBS.LAST_CONTACT_UPDATE_INTERVAL) return
|
||||
if (updatingRunner.has(runner.id)) return
|
||||
|
||||
updatingRunner.add(runner.id)
|
||||
|
|
|
@ -23,7 +23,7 @@ describe('Test video captions API validator', function () {
|
|||
// ---------------------------------------------------------------
|
||||
|
||||
before(async function () {
|
||||
this.timeout(30000)
|
||||
this.timeout(120000)
|
||||
|
||||
server = await createSingleServer(1)
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ describe('Test moderation notifications', function () {
|
|||
let emails: object[] = []
|
||||
|
||||
before(async function () {
|
||||
this.timeout(50000)
|
||||
this.timeout(120000)
|
||||
|
||||
const res = await prepareNotificationsTest(3)
|
||||
emails = res.emails
|
||||
|
|
|
@ -21,7 +21,7 @@ describe('Test registrations notifications', function () {
|
|||
let baseParams: CheckerBaseParams
|
||||
|
||||
before(async function () {
|
||||
this.timeout(50000)
|
||||
this.timeout(120000)
|
||||
|
||||
const res = await prepareNotificationsTest(1)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ describe('Test videos search', function () {
|
|||
let command: SearchCommand
|
||||
|
||||
before(async function () {
|
||||
this.timeout(240000)
|
||||
this.timeout(360000)
|
||||
|
||||
const servers = await Promise.all([
|
||||
createSingleServer(1),
|
||||
|
|
Loading…
Reference in New Issue