import 'mocha'
import * as chai from 'chai'
+import { wait } from '@shared/core-utils'
import { VideoPrivacy, VideoState } from '@shared/models'
import {
cleanupTests,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
setDefaultVideoChannel,
stopFfmpeg,
- wait,
waitJobs,
waitUntilLivePublishedOnAllServers
-} from '../../../../shared/extra-utils'
+} from '@shared/server-commands'
const expect = chai.expect
describe('Test live', function () {
- let servers: ServerInfo[] = []
+ let servers: PeerTubeServer[] = []
before(async function () {
this.timeout(120000)
- servers = await flushAndRunMultipleServers(2)
+ servers = await createMultipleServers(2)
// Get the access tokens
await setAccessTokensToServers(servers)
await servers[0].videos.view({ id: liveVideoUUID })
await servers[1].videos.view({ id: liveVideoUUID })
- await waitJobs(servers)
- await wait(5000)
await waitJobs(servers)
expect(localLastVideoViews).to.equal(2)