diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/activitypub/cleaner.ts | 15 | ||||
-rw-r--r-- | server/tests/api/server/handle-down.ts | 2 |
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) |