ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix tests
Chocobozzz55a8b7b899c6
diff --git a/packages/tests/src/api/stats/video-downloads-counter.ts b/packages/tests/src/api/stats/video-downloads-counter.tsindex b45eb12cde..cf5583da35 100644--- a/packages/tests/src/api/stats/video-downloads-counter.ts+++ b/packages/tests/src/api/stats/video-downloads-counter.ts@@ -5,6 +5,7 @@ import { HttpStatusCode } from '@peertube/peertube-models'import {createMultipleServers,doubleFollow,+ killallServers,makeRawRequest,PeerTubeServer,setAccessTokensToServers,@@ -118,4 +119,8 @@ describe('Test video downloads stats', function () {expect(data.reduce((sum, point) => sum + point.value, 0)).to.equal(3)})++ after(async function () {+ await killallServers(servers)+ })})diff --git a/packages/tests/src/server-helpers/stream-throttle.ts b/packages/tests/src/server-helpers/stream-throttle.tsindex 06ebadea9c..96b8cde427 100644--- a/packages/tests/src/server-helpers/stream-throttle.ts+++ b/packages/tests/src/server-helpers/stream-throttle.ts@@ -1,9 +1,9 @@/* oxlint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */+import { ThrottleStream } from '@peertube/peertube-server/core/helpers/stream-throttle.js'import { expect } from 'chai'import { Readable } from 'stream'import { pipeline } from 'stream/promises'-import { ThrottleStream } from '@peertube/peertube-server/core/helpers/stream-throttle.js'async function collectStream (readable: Readable): Promise<Buffer> {const chunks: Buffer[] = []@@ -160,15 +160,5 @@ describe('ThrottleStream', function () {// 10 chunks: first passes immediately, remaining 9 each wait ~100ms → ~900msexpect(elapsed).to.be.at.least(700)})-- it('Should not throttle when no IP is provided even with bytesPerIpPerSecond set', async function () {- this.timeout(5000)-- // Without an IP the per-IP limiter should not apply- const input = Buffer.alloc(50 * 1024)- const { elapsed } = await throttledCollect(input, { bytesPerIpPerSecond: 1024 }) // 1 KB/s would be very slow-- expect(elapsed).to.be.lessThan(2000)- })})})