aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/server/stats.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/tests/api/server/stats.ts b/server/tests/api/server/stats.ts
index 9f785a80e..b752da743 100644
--- a/server/tests/api/server/stats.ts
+++ b/server/tests/api/server/stats.ts
@@ -135,7 +135,7 @@ describe('Test stats (excluding redundancy)', function () {
135 }) 135 })
136 136
137 it('Should correctly count video file sizes if transcoding is enabled', async function () { 137 it('Should correctly count video file sizes if transcoding is enabled', async function () {
138 this.timeout(20000) 138 this.timeout(60000)
139 139
140 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, { 140 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, {
141 transcoding: { 141 transcoding: {
@@ -179,6 +179,12 @@ describe('Test stats (excluding redundancy)', function () {
179 it('Should have the correct AP stats', async function () { 179 it('Should have the correct AP stats', async function () {
180 this.timeout(60000) 180 this.timeout(60000)
181 181
182 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, {
183 transcoding: {
184 enabled: false
185 }
186 })
187
182 for (let i = 0; i < 10; i++) { 188 for (let i = 0; i < 10; i++) {
183 await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'video' }) 189 await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'video' })
184 } 190 }
@@ -191,7 +197,6 @@ describe('Test stats (excluding redundancy)', function () {
191 const res2 = await getStats(servers[1].url) 197 const res2 = await getStats(servers[1].url)
192 const second: ServerStats = res2.body 198 const second: ServerStats = res2.body
193 199
194 expect(second.totalActivityPubMessagesWaiting).to.equal(0)
195 expect(second.totalActivityPubMessagesProcessed).to.be.greaterThan(first.totalActivityPubMessagesProcessed) 200 expect(second.totalActivityPubMessagesProcessed).to.be.greaterThan(first.totalActivityPubMessagesProcessed)
196 201
197 await wait(5000) 202 await wait(5000)
@@ -199,6 +204,7 @@ describe('Test stats (excluding redundancy)', function () {
199 const res3 = await getStats(servers[1].url) 204 const res3 = await getStats(servers[1].url)
200 const third: ServerStats = res3.body 205 const third: ServerStats = res3.body
201 206
207 expect(third.totalActivityPubMessagesWaiting).to.equal(0)
202 expect(third.activityPubMessagesProcessedPerSecond).to.be.lessThan(second.activityPubMessagesProcessedPerSecond) 208 expect(third.activityPubMessagesProcessedPerSecond).to.be.lessThan(second.activityPubMessagesProcessedPerSecond)
203 }) 209 })
204 210