mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-05 14:48:07 +00:00
Increase e2e test timeouts on CI to fix flaky tests (#37053)
Introduce a `GITEA_TEST_E2E_TIMEOUT_FACTOR` env var (3 on CI, 1 locally, overridable) to scale Playwright e2e timeouts, fixing flaky tests like `logout propagation` that timed out waiting for SSE event propagation on slow CI runners. | Timeout | Before (local) | After (local) | Before (CI) | After (CI) | |---|---|---|---|---| | expect | 3000 | 5000 | 6000 | 15000 | | action | 3000 | 5000 | 6000 | 15000 | | test | 6000 | 10000 | 12000 | 30000 | | navigation | 6000 | 10000 | 12000 | 30000 | --- This PR was written with the help of Claude Opus 4.6 --------- Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
This commit is contained in:
@@ -88,10 +88,20 @@ GITEA_TEST_E2E_EMAIL="$GITEA_TEST_E2E_USER@$GITEA_TEST_E2E_DOMAIN"
|
||||
--must-change-password=false \
|
||||
--admin
|
||||
|
||||
# timeout multiplier, CI runners are slower
|
||||
if [ -z "${GITEA_TEST_E2E_TIMEOUT_FACTOR:-}" ]; then
|
||||
if [ -n "${CI:-}" ]; then
|
||||
GITEA_TEST_E2E_TIMEOUT_FACTOR=3
|
||||
else
|
||||
GITEA_TEST_E2E_TIMEOUT_FACTOR=1
|
||||
fi
|
||||
fi
|
||||
|
||||
export GITEA_TEST_E2E_URL="$E2E_URL"
|
||||
export GITEA_TEST_E2E_DOMAIN
|
||||
export GITEA_TEST_E2E_USER
|
||||
export GITEA_TEST_E2E_PASSWORD
|
||||
export GITEA_TEST_E2E_EMAIL
|
||||
export GITEA_TEST_E2E_TIMEOUT_FACTOR
|
||||
|
||||
pnpm exec playwright test "$@"
|
||||
|
||||
Reference in New Issue
Block a user