X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fserver%2Fhandle-down.ts;h=fa1a3c4446612eac29572933d6a4d8c32ae45935;hb=2b02c520e66ea452687cab39401b371711caa9ed;hp=2cf6e15adcd9290fda9bc4cc837841f10b0641ad;hpb=134cf2bce96a8c5aefd55154e884964975d8cf23;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts index 2cf6e15ad..fa1a3c444 100644 --- a/server/tests/api/server/handle-down.ts +++ b/server/tests/api/server/handle-down.ts @@ -4,7 +4,7 @@ import * as chai from 'chai' import 'mocha' import { JobState, Video } from '../../../../shared/models' import { VideoPrivacy } from '../../../../shared/models/videos' -import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' +import { VideoCommentThreadTree } from '../../../../shared/models/videos/comment/video-comment.model' import { cleanupTests, @@ -33,6 +33,7 @@ import { getVideoCommentThreads, getVideoThreadComments } from '../../../../shared/extra-utils/videos/video-comments' +import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' const expect = chai.expect @@ -142,7 +143,7 @@ describe('Test handle downs', function () { await uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes) } - await waitJobs(servers[0]) + await waitJobs([ servers[0], servers[2] ]) // Kill server 3 killallServers([ servers[2] ]) @@ -347,12 +348,12 @@ describe('Test handle downs', function () { for (let i = 0; i < 3; i++) { await getVideo(servers[1].url, videoIdsServer1[i]) - await wait(1000) await waitJobs([ servers[1] ]) + await wait(1500) } for (const id of videoIdsServer1) { - await getVideo(servers[1].url, id, 403) + await getVideo(servers[1].url, id, HttpStatusCode.FORBIDDEN_403) } })