Try to fix tests

This commit is contained in:
Chocobozzz
2022-10-10 11:31:01 +02:00
parent 63fa260a81
commit 34aa316f58
3 changed files with 45 additions and 11 deletions

View File

@@ -58,13 +58,16 @@ async function testVideoResolutions (options: {
: originServer.url + '/static/streaming-playlists/hls'
if (objectStorage) {
// Playlist file upload
await wait(500)
await originServer.live.waitUntilSegmentUpload({ playlistNumber: i, segment: segmentNum })
await wait(1000)
expect(hlsPlaylist.segmentsSha256Url).to.contain(ObjectStorageCommand.getPlaylistBaseUrl())
}
const subPlaylist = await originServer.streamingPlaylists.get({ url: `${baseUrl}/${video.uuid}/${i}.m3u8` })
const subPlaylist = await originServer.streamingPlaylists.get({
url: `${baseUrl}/${video.uuid}/${i}.m3u8`,
withRetry: objectStorage // With object storage, the request may fail because of inconsistent data in S3
})
expect(subPlaylist).to.contain(segmentName)