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
}
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 () {
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 () {
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 () {
after(async function () {
killallServers(servers)
-
- // Keep the logs if the test failed
- if (this['ok']) {
- await flushTests()
- }
})
})