uploadVideo,
viewVideo,
wait
-} from '../../utils'
-import { flushTests, setAccessTokensToServers } from '../../utils/index'
-import { getStats } from '../../utils/server/stats'
-import { addVideoCommentThread } from '../../utils/videos/video-comments'
+} from '../../../../shared/utils'
+import { flushTests, setAccessTokensToServers } from '../../../../shared/utils/index'
+import { getStats } from '../../../../shared/utils/server/stats'
+import { addVideoCommentThread } from '../../../../shared/utils/videos/video-comments'
+import { waitJobs } from '../../../../shared/utils/server/jobs'
const expect = chai.expect
-describe('Test stats', function () {
+describe('Test stats (excluding redundancy)', function () {
let servers: ServerInfo[] = []
before(async function () {
await viewVideo(servers[0].url, videoUUID)
+ // Wait the video views repeatable job
+ await wait(8000)
+
await follow(servers[2].url, [ servers[0].url ], servers[2].accessToken)
- await wait(5000)
+ await waitJobs(servers)
})
it('Should have the correct stats on instance 1', async function () {
after(async function () {
killallServers(servers)
-
- // Keep the logs if the test failed
- if (this['ok']) {
- await flushTests()
- }
})
})