diff options
-rw-r--r-- | server/helpers/geo-ip.ts | 2 | ||||
-rw-r--r-- | server/tests/api/live/live-constraints.ts | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/server/helpers/geo-ip.ts b/server/helpers/geo-ip.ts index 4ba7011c2..9e44d660f 100644 --- a/server/helpers/geo-ip.ts +++ b/server/helpers/geo-ip.ts | |||
@@ -53,7 +53,7 @@ export class GeoIP { | |||
53 | 53 | ||
54 | await writeFile(mmdbPath, gotResult.body) | 54 | await writeFile(mmdbPath, gotResult.body) |
55 | 55 | ||
56 | // Reini reader | 56 | // Reinit reader |
57 | this.reader = undefined | 57 | this.reader = undefined |
58 | 58 | ||
59 | logger.info('GeoIP database updated %s.', mmdbPath, lTags()) | 59 | logger.info('GeoIP database updated %s.', mmdbPath, lTags()) |
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts index b81973395..cab76f425 100644 --- a/server/tests/api/live/live-constraints.ts +++ b/server/tests/api/live/live-constraints.ts | |||
@@ -13,6 +13,7 @@ import { | |||
13 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
14 | setDefaultVideoChannel, | 14 | setDefaultVideoChannel, |
15 | waitJobs, | 15 | waitJobs, |
16 | waitUntilLiveReplacedByReplayOnAllServers, | ||
16 | waitUntilLiveWaitingOnAllServers | 17 | waitUntilLiveWaitingOnAllServers |
17 | } from '@shared/server-commands' | 18 | } from '@shared/server-commands' |
18 | import { checkLiveCleanup } from '../../shared' | 19 | import { checkLiveCleanup } from '../../shared' |
@@ -53,12 +54,6 @@ describe('Test live constraints', function () { | |||
53 | await checkLiveCleanup(servers[0], videoId, resolutions) | 54 | await checkLiveCleanup(servers[0], videoId, resolutions) |
54 | } | 55 | } |
55 | 56 | ||
56 | async function waitUntilLivePublishedOnAllServers (videoId: string) { | ||
57 | for (const server of servers) { | ||
58 | await server.live.waitUntilPublished({ videoId }) | ||
59 | } | ||
60 | } | ||
61 | |||
62 | function updateQuota (options: { total: number, daily: number }) { | 57 | function updateQuota (options: { total: number, daily: number }) { |
63 | return servers[0].users.update({ | 58 | return servers[0].users.update({ |
64 | userId, | 59 | userId, |
@@ -117,7 +112,7 @@ describe('Test live constraints', function () { | |||
117 | const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false }) | 112 | const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false }) |
118 | await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true }) | 113 | await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true }) |
119 | 114 | ||
120 | await waitUntilLivePublishedOnAllServers(userVideoLiveoId) | 115 | await waitUntilLiveReplacedByReplayOnAllServers(servers, userVideoLiveoId) |
121 | await waitJobs(servers) | 116 | await waitJobs(servers) |
122 | 117 | ||
123 | await checkSaveReplay(userVideoLiveoId) | 118 | await checkSaveReplay(userVideoLiveoId) |
@@ -153,7 +148,7 @@ describe('Test live constraints', function () { | |||
153 | const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false }) | 148 | const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false }) |
154 | await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true }) | 149 | await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true }) |
155 | 150 | ||
156 | await waitUntilLivePublishedOnAllServers(userVideoLiveoId) | 151 | await waitUntilLiveReplacedByReplayOnAllServers(servers, userVideoLiveoId) |
157 | await waitJobs(servers) | 152 | await waitJobs(servers) |
158 | 153 | ||
159 | await checkSaveReplay(userVideoLiveoId) | 154 | await checkSaveReplay(userVideoLiveoId) |
@@ -194,7 +189,7 @@ describe('Test live constraints', function () { | |||
194 | const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false }) | 189 | const userVideoLiveoId = await createLiveWrapper({ replay: true, permanent: false }) |
195 | await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true }) | 190 | await servers[0].live.runAndTestStreamError({ token: userAccessToken, videoId: userVideoLiveoId, shouldHaveError: true }) |
196 | 191 | ||
197 | await waitUntilLivePublishedOnAllServers(userVideoLiveoId) | 192 | await waitUntilLiveReplacedByReplayOnAllServers(servers, userVideoLiveoId) |
198 | await waitJobs(servers) | 193 | await waitJobs(servers) |
199 | 194 | ||
200 | await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240, 144 ]) | 195 | await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240, 144 ]) |