From 10a72a7e617273cdbe897766f77f427eb57b689a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Dec 2021 11:41:41 +0100 Subject: Fix tests --- server/tests/api/activitypub/cleaner.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'server/tests/api/activitypub') 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 () { { const video = await servers[0].videos.get({ id: uuid }) - expect(video.likes).to.equal(3) + expect(video.likes).to.equal(2) expect(video.dislikes).to.equal(0) } { - const { total } = await servers[0].comments.listThreads({ videoId: videoUUID1 }) + const { total } = await servers[0].comments.listThreads({ videoId: uuid }) expect(total).to.equal(2) } } @@ -319,8 +319,15 @@ describe('Test AP cleaner', function () { await wait(5000) await expectNotDeleted() - await wait(15000) - await expectDeleted() + let continueWhile = true + + do { + try { + await expectDeleted() + continueWhile = false + } catch { + } + } while (continueWhile) }) after(async function () { -- cgit v1.2.3