diff options
Diffstat (limited to 'server/tests/api/activitypub/cleaner.ts')
-rw-r--r-- | server/tests/api/activitypub/cleaner.ts | 15 |
1 files changed, 11 insertions, 4 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 () { |