fix(seats): widen the lock budget in the concurrency tests (CI flake) #103
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/kws!103
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/seats-concurrency-test-flake"
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?
Fixes a CI flake seen on PR #102:
TestHoldsAcrossTwoNodes(seats pgstore) failed withseats: busy, try againwhen the runner was overloaded (platform/postgrestook 542 s,sales/pgstore430 s). The commits queued on the day rows outlasted the fixed 3 s lock budget; the test's own comment already recorded the same failure once.What
const lockWait, 3 s) is now aStorefield:Newsets the default (still 3 s),Store.WithLockWait(d)returns a copy with another budget, andboundedtakes it as a parameter. All 7 call sites use the store's budget. Production behaviour is unchanged.reserve_concurrency_test.gowiden it to 15 s. A real deadlock is still reported as 40P01 -> ErrBusy by Postgres within about 1 s, so the tests still fail on one.TestWithLockWait_ChangesTheBudget(written first; it did not compile before the option existed).Review
Dual pass done: Pass 1 (ponytail) no Must fix (one comment corrected,
2884c27); Pass 2 approved with no Critical or Important findings.Known limits
placeAllininternal/sales/pgstore/checkout_test.go(the likeliest next flake), two concurrent tests insales/pgstore/complete_test.go, and the wallet concurrency tests.WithLockWaitis exported only for tests.Checks
make cover: 89.3% (minimum 80%).go test -race -count=3 ./internal/seats/...,make lintgreen locally. No migration, no deploy change.🤖 Generated with Claude Code