aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-12-28 11:41:41 +0100
committerChocobozzz <me@florianbigard.com>2021-12-28 14:12:57 +0100
commit10a72a7e617273cdbe897766f77f427eb57b689a (patch)
treec467a690a6fbf4c70a75baf8ac0bd9db42bb5491 /server/tests/api
parentf1569117f9bc468bc38b5b8d32df1bce40cc42ad (diff)
downloadPeerTube-10a72a7e617273cdbe897766f77f427eb57b689a.tar.gz
PeerTube-10a72a7e617273cdbe897766f77f427eb57b689a.tar.zst
PeerTube-10a72a7e617273cdbe897766f77f427eb57b689a.zip
Fix tests
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/activitypub/cleaner.ts15
-rw-r--r--server/tests/api/server/handle-down.ts2
2 files changed, 12 insertions, 5 deletions
diff --git a/server/tests/api/activitypub/cleaner.ts b/server/tests/api/activitypub/cleaner.ts
index dc885023a..d0a151f5c 100644
--- a/server/tests/api/activitypub/cleaner.ts
+++ b/server/tests/api/activitypub/cleaner.ts
@@ -291,12 +291,12 @@ describe('Test AP cleaner', function () {
291 { 291 {
292 const video = await servers[0].videos.get({ id: uuid }) 292 const video = await servers[0].videos.get({ id: uuid })
293 293
294 expect(video.likes).to.equal(3) 294 expect(video.likes).to.equal(2)
295 expect(video.dislikes).to.equal(0) 295 expect(video.dislikes).to.equal(0)
296 } 296 }
297 297
298 { 298 {
299 const { total } = await servers[0].comments.listThreads({ videoId: videoUUID1 }) 299 const { total } = await servers[0].comments.listThreads({ videoId: uuid })
300 expect(total).to.equal(2) 300 expect(total).to.equal(2)
301 } 301 }
302 } 302 }
@@ -319,8 +319,15 @@ describe('Test AP cleaner', function () {
319 await wait(5000) 319 await wait(5000)
320 await expectNotDeleted() 320 await expectNotDeleted()
321 321
322 await wait(15000) 322 let continueWhile = true
323 await expectDeleted() 323
324 do {
325 try {
326 await expectDeleted()
327 continueWhile = false
328 } catch {
329 }
330 } while (continueWhile)
324 }) 331 })
325 332
326 after(async function () { 333 after(async function () {
diff --git a/server/tests/api/server/handle-down.ts b/server/tests/api/server/handle-down.ts
index 7c3836681..3dcd076f5 100644
--- a/server/tests/api/server/handle-down.ts
+++ b/server/tests/api/server/handle-down.ts
@@ -50,7 +50,7 @@ describe('Test handle downs', function () {
50 let commentCommands: CommentsCommand[] 50 let commentCommands: CommentsCommand[]
51 51
52 before(async function () { 52 before(async function () {
53 this.timeout(30000) 53 this.timeout(120000)
54 54
55 servers = await createMultipleServers(3) 55 servers = await createMultipleServers(3)
56 commentCommands = servers.map(s => s.comments) 56 commentCommands = servers.map(s => s.comments)