diff --git a/apps/api/src/routes/v1_keys_verifyKey.ratelimit_accuracy.test.ts b/apps/api/src/routes/v1_keys_verifyKey.ratelimit_accuracy.test.ts index 4095c93cd..a1de926bc 100644 --- a/apps/api/src/routes/v1_keys_verifyKey.ratelimit_accuracy.test.ts +++ b/apps/api/src/routes/v1_keys_verifyKey.ratelimit_accuracy.test.ts @@ -56,27 +56,11 @@ const testCases: { rps: 200, // 3x the limit seconds: 180, // 12 windows }, - - // Real world: API limit scenario - { - limit: 500, - duration: 60000, // 60s window - rps: 50, // 6x the limit - seconds: 780, // 13 windows - }, - - // High volume, medium window - { - limit: 1000, - duration: 60000, // 60s window - rps: 100, // 6x the limit - seconds: 720, // 12 windows - }, ]; for (const { limit, duration, rps, seconds } of testCases) { const name = `[${limit} / ${duration / 1000}s], attacked with ${rps} rps for ${seconds}s`; - test(name, { skip: process.env.TEST_LOCAL, retry: 3, timeout: 600_000 }, async (t) => { + test(name, { skip: process.env.TEST_LOCAL, retry: 3, timeout: 1_800_000 }, async (t) => { const h = await IntegrationHarness.init(t); const { key, keyId } = await h.createKey(); diff --git a/apps/api/src/routes/v1_ratelimits_limit.accuracy.test.ts b/apps/api/src/routes/v1_ratelimits_limit.accuracy.test.ts index bc58da71e..6b5359476 100644 --- a/apps/api/src/routes/v1_ratelimits_limit.accuracy.test.ts +++ b/apps/api/src/routes/v1_ratelimits_limit.accuracy.test.ts @@ -56,26 +56,10 @@ const testCases: { rps: 200, // 3x the limit seconds: 180, // 12 windows }, - - // Real world: API limit scenario - { - limit: 500, - duration: 60000, // 60s window - rps: 50, // 6x the limit - seconds: 780, // 13 windows - }, - - // High volume, medium window - { - limit: 1000, - duration: 60000, // 60s window - rps: 100, // 6x the limit - seconds: 720, // 12 windows - }, ]; for (const { limit, duration, rps, seconds } of testCases) { const name = `[${limit} / ${duration / 1000}s], attacked with ${rps} rps for ${seconds}s`; - test(name, { skip: process.env.TEST_LOCAL, retry: 3, timeout: 600_000 }, async (t) => { + test(name, { skip: process.env.TEST_LOCAL, retry: 3, timeout: 1_800_000 }, async (t) => { const h = await IntegrationHarness.init(t); const namespace = { id: newId("test"),