diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-16 09:37:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-16 16:41:36 +0200 |
commit | fd28a0fc8833c8cfe1017a88fbda141130b2d263 (patch) | |
tree | d289737e92207a7a08657f55f598cd3c8b871733 /server/tests | |
parent | 65b21c961c69c4a63c7c0c34be3d6d034a1176c7 (diff) | |
download | PeerTube-fd28a0fc8833c8cfe1017a88fbda141130b2d263.tar.gz PeerTube-fd28a0fc8833c8cfe1017a88fbda141130b2d263.tar.zst PeerTube-fd28a0fc8833c8cfe1017a88fbda141130b2d263.zip |
Fix redundancy test
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/server/redundancy.ts | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts index 1960854b6..f50d6e3cf 100644 --- a/server/tests/api/server/redundancy.ts +++ b/server/tests/api/server/redundancy.ts | |||
@@ -419,7 +419,7 @@ describe('Test videos redundancy', function () { | |||
419 | 419 | ||
420 | killallServers([ servers[0] ]) | 420 | killallServers([ servers[0] ]) |
421 | 421 | ||
422 | await wait(10000) | 422 | await wait(15000) |
423 | 423 | ||
424 | await checkNotContains([ servers[1], servers[2] ], 'http%3A%2F%2Flocalhost%3A9001') | 424 | await checkNotContains([ servers[1], servers[2] ], 'http%3A%2F%2Flocalhost%3A9001') |
425 | }) | 425 | }) |
@@ -452,26 +452,22 @@ describe('Test videos redundancy', function () { | |||
452 | }) | 452 | }) |
453 | 453 | ||
454 | it('Should cache video 2 webseed on the first video', async function () { | 454 | it('Should cache video 2 webseed on the first video', async function () { |
455 | this.timeout(50000) | 455 | this.timeout(120000) |
456 | 456 | ||
457 | await waitJobs(servers) | 457 | await waitJobs(servers) |
458 | 458 | ||
459 | await wait(7000) | 459 | let checked = false |
460 | 460 | ||
461 | try { | 461 | while (checked === false) { |
462 | await check1WebSeed(strategy, video1Server2UUID) | 462 | await wait(1000) |
463 | await check2Webseeds(strategy, video2Server2UUID) | ||
464 | } catch { | ||
465 | await wait(3000) | ||
466 | 463 | ||
467 | try { | 464 | try { |
468 | await check1WebSeed(strategy, video1Server2UUID) | 465 | await check1WebSeed(strategy, video1Server2UUID) |
469 | await check2Webseeds(strategy, video2Server2UUID) | 466 | await check2Webseeds(strategy, video2Server2UUID) |
470 | } catch { | ||
471 | await wait(5000) | ||
472 | 467 | ||
473 | await check1WebSeed(strategy, video1Server2UUID) | 468 | checked = true |
474 | await check2Webseeds(strategy, video2Server2UUID) | 469 | } catch { |
470 | checked = false | ||
475 | } | 471 | } |
476 | } | 472 | } |
477 | }) | 473 | }) |