veza/apps/web/playwright.config.ts.patch

33 lines
799 B
Diff
Raw Normal View History

2025-12-22 21:00:50 +00:00
# PATCH: Réduire workers Playwright pour éviter rate limiting
## Problème
6 workers = 6 logins simultanés = Rate limit 429
## Solution
Réduire à 1-2 workers
## Fichier à modifier: playwright.config.ts
```diff
export default defineConfig({
testDir: './e2e',
- workers: process.env.CI ? 1 : undefined, // Use all CPU cores locally
+ workers: 1, // ⚠️ CRITICAL: 1 worker pour éviter rate limiting backend
```
## Alternative: Augmenter timeout entre tests
Si vous voulez garder plusieurs workers, ajoutez :
```typescript
globalSetup: './e2e/global-setup.ts',
```
Et créez `e2e/global-setup.ts` :
```typescript
export default async function globalSetup() {
// Wait between test files to avoid rate limiting
process.env.PLAYWRIGHT_TEST_BASE_DELAY = '2000'; // 2 seconds
}
```