]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/handle-down.ts
Cleanup shared models
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / handle-down.ts
index 2cf6e15adcd9290fda9bc4cc837841f10b0641ad..fa1a3c4446612eac29572933d6a4d8c32ae45935 100644 (file)
@@ -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)
     }
   })