import * as express from 'express'
+import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
import { ResultList, ThreadsResultList, UserRight } from '../../../../shared/models'
import { VideoCommentCreate } from '../../../../shared/models/videos/video-comment.model'
import { auditLoggerFactory, CommentAuditView, getAuditIdFromRes } from '../../../helpers/audit-logger'
} from '../../../middlewares/validators'
import { AccountModel } from '../../../models/account/account'
import { VideoCommentModel } from '../../../models/video/video-comment'
-import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
-import { logger } from '@server/helpers/logger'
const auditLogger = auditLoggerFactory('comments')
const videoCommentRouter = express.Router()
updateUser,
userLogin,
wait,
- waitJobs
+ waitJobs,
+ waitUntilLivePublished
} from '../../../../shared/extra-utils'
const expect = chai.expect
await checkLiveCleanup(servers[0], videoId, resolutions)
}
+ async function waitUntilLivePublishedOnAllServers (videoId: string) {
+ for (const server of servers) {
+ await waitUntilLivePublished(server.url, server.accessToken, videoId)
+ }
+ }
+
before(async function () {
this.timeout(120000)
const userVideoLiveoId = await createLiveWrapper(true)
await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
+ await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId)
const userVideoLiveoId = await createLiveWrapper(true)
await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
+ await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId)
const userVideoLiveoId = await createLiveWrapper(true)
await runAndTestFfmpegStreamError(servers[0].url, userAccessToken, userVideoLiveoId, true)
+ await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240 ])