fix(tests): isolate rate-limit-sensitive invitation tests on own factories #61
No reviewers
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit!61
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/invitation-tests-rate-limit-isolation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #60 — fixes the CI failure in run 11393.
Root cause:
GetByCode_ExpiredInvitationexpected 410 but got 429 on CI — the/code/{code}endpoint'sinvite-code-lookupwindow is per-server, and the 1000-guess brute-force test shares the class-fixture server. When CI's test order ran brute-force first, the window was drained before the 410 assertion. Locally the order was luckier — order-coupling, not flakiness.Fix: each rate-limit-sensitive test gets its own factory fixture (fresh server = fresh window); invitation seeding extracted to a shared
InvitationSeedshelper. Suite green ×2 consecutive local runs (774 / 0 / 39).CI run 11393 failed: GetByCode_ExpiredInvitation expected 410, got 429 — the /code/{code} endpoint's invite-code-lookup window is per-server, and the 1000-guess brute-force test sharing the same class fixture had already drained it when test order differed on the CI runner. Locally the order was luckier — order-coupling, not flakiness. - GetByCode_410 test and brute-force test each get their own factory fixture (fresh server = fresh rate-limit window) - invitation seeding extracted to shared InvitationSeeds helper - suite green x2 consecutive local runs (774 / 0 failed / 39 skipped)