X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-privacy.ts;h=9fefca7e3d919e90e280a3592a0aa164dc477643;hb=c1c86c1599acf8aad71fb7d7f312c43d6d1fa5ac;hp=ea435d5afedee39a5b573bb556541b7a100717e5;hpb=77a87fec6c244074b786f67e135a1fe35bd7009f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index ea435d5af..9fefca7e3 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts @@ -5,18 +5,17 @@ import 'mocha' import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' import { flushAndRunMultipleServers, - flushTests, getVideosList, killallServers, ServerInfo, setAccessTokensToServers, - uploadVideo, - wait + uploadVideo } from '../../utils/index' import { doubleFollow } from '../../utils/server/follows' import { userLogin } from '../../utils/users/login' import { createUser } from '../../utils/users/users' import { getMyVideos, getVideo, getVideoWithToken, updateVideo } from '../../utils/videos/videos' +import { waitJobs } from '../../utils/server/jobs' const expect = chai.expect @@ -48,7 +47,7 @@ describe('Test video privacy', function () { } await uploadVideo(servers[0].url, servers[0].accessToken, attributes) - await wait(5000) + await waitJobs(servers) }) it('Should not have this private video on server 2', async function () { @@ -99,7 +98,7 @@ describe('Test video privacy', function () { await uploadVideo(servers[1].url, servers[1].accessToken, attributes) // Server 2 has transcoding enabled - await wait(10000) + await waitJobs(servers) }) it('Should not have this unlisted video listed on server 1 and 2', async function () { @@ -139,7 +138,7 @@ describe('Test video privacy', function () { now = Date.now() await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, attribute) - await wait(5000) + await waitJobs(servers) }) it('Should have this new public video listed on server 1 and 2', async function () { @@ -155,10 +154,5 @@ describe('Test video privacy', function () { after(async function () { killallServers(servers) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) })