aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/redundancy.ts25
1 files changed, 16 insertions, 9 deletions
diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts
index e1709891d..fcf1eacd3 100644
--- a/server/tests/api/server/redundancy.ts
+++ b/server/tests/api/server/redundancy.ts
@@ -15,7 +15,8 @@ import {
15 setAccessTokensToServers, unfollow, 15 setAccessTokensToServers, unfollow,
16 uploadVideo, 16 uploadVideo,
17 viewVideo, 17 viewVideo,
18 wait 18 wait,
19 waitUntilLog
19} from '../../utils' 20} from '../../utils'
20import { waitJobs } from '../../utils/server/jobs' 21import { waitJobs } from '../../utils/server/jobs'
21import * as magnetUtil from 'magnet-uri' 22import * as magnetUtil from 'magnet-uri'
@@ -225,7 +226,7 @@ describe('Test videos redundancy', function () {
225 this.timeout(40000) 226 this.timeout(40000)
226 227
227 await waitJobs(servers) 228 await waitJobs(servers)
228 await wait(15000) 229 await waitUntilLog(servers[0], 'Duplicated ', 4)
229 await waitJobs(servers) 230 await waitJobs(servers)
230 231
231 await check2Webseeds(strategy) 232 await check2Webseeds(strategy)
@@ -270,7 +271,7 @@ describe('Test videos redundancy', function () {
270 this.timeout(40000) 271 this.timeout(40000)
271 272
272 await waitJobs(servers) 273 await waitJobs(servers)
273 await wait(15000) 274 await waitUntilLog(servers[0], 'Duplicated ', 4)
274 await waitJobs(servers) 275 await waitJobs(servers)
275 276
276 await check2Webseeds(strategy) 277 await check2Webseeds(strategy)
@@ -336,7 +337,7 @@ describe('Test videos redundancy', function () {
336 this.timeout(40000) 337 this.timeout(40000)
337 338
338 await waitJobs(servers) 339 await waitJobs(servers)
339 await wait(15000) 340 await waitUntilLog(servers[0], 'Duplicated ', 4)
340 await waitJobs(servers) 341 await waitJobs(servers)
341 342
342 await check2Webseeds(strategy) 343 await check2Webseeds(strategy)
@@ -423,7 +424,7 @@ describe('Test videos redundancy', function () {
423 await enableRedundancyOnServer1() 424 await enableRedundancyOnServer1()
424 425
425 await waitJobs(servers) 426 await waitJobs(servers)
426 await wait(5000) 427 await waitUntilLog(servers[0], 'Duplicated ', 4)
427 await waitJobs(servers) 428 await waitJobs(servers)
428 429
429 await check2Webseeds(strategy) 430 await check2Webseeds(strategy)
@@ -434,15 +435,21 @@ describe('Test videos redundancy', function () {
434 }) 435 })
435 436
436 it('Should cache video 2 webseed on the first video', async function () { 437 it('Should cache video 2 webseed on the first video', async function () {
437 this.timeout(40000) 438 this.timeout(50000)
438 this.retries(3)
439 439
440 await waitJobs(servers) 440 await waitJobs(servers)
441 441
442 await wait(7000) 442 await wait(7000)
443 443
444 await check1WebSeed(strategy, video1Server2UUID) 444 try {
445 await check2Webseeds(strategy, video2Server2UUID) 445 await check1WebSeed(strategy, video1Server2UUID)
446 await check2Webseeds(strategy, video2Server2UUID)
447 } catch {
448 await wait(7000)
449
450 await check1WebSeed(strategy, video1Server2UUID)
451 await check2Webseeds(strategy, video2Server2UUID)
452 }
446 }) 453 })
447 454
448 after(function () { 455 after(function () {