Commit 0be9fc7
committed
test(kv): address PR #745 round-1 review
Round-1 review on commit ad924ad:
- gemini medium: assert minimum elapsed time, not just upper bound.
Without a lower bound a future regression returning DeadlineExceeded
before actually waiting would silently pass. Added a lower-bound
check with 200ms slack so a slow CI scheduler that trips ctx.Done()
a hair before the wall clock catches up does not flake.
- claude bot (style): trim incident narrative from the
verifyLeaderTimeout doc comment. Specific IPs, goroutine counts,
and timestamps belong in the commit message and PR body, not the
source — they go stale and add no design value at the call site.
Kept the rationale (why 5s, the O(N) pendingReads feedback loop,
match leaderForwardTimeout) and added a "see PR #745" reference
for readers who want the full incident detail.
- claude bot: switch the regression test from stdlib
`stderrors "errors"` to `github.com/cockroachdb/errors` for
consistency with the project convention (CLAUDE.md mandates
cockroachdb/errors at boundaries; the test is a boundary). Also
drops the import alias which made gci complain about ordering.
- claude bot: add `if testing.Short() { t.Skip(...) }` guard so
`go test -short ./kv/...` does not pay the verifyLeaderTimeout
(5s) wait. Default `make test` still runs it.
- reviewdog/golangci (gci): import order fixed by reordering
third-party (cockroachdb) above local (bootjp) per the project's
default gci sections (standard, default, prefix(...)).
No behavior change. Test still passes:
go test -race -count=1 -run TestVerifyLeaderEngine ./kv -- 6.06s
go test -race -count=1 -short ./kv -- 5.55s (test skipped under -short)
No semantic change to the production fix; this commit is test +
comment polish only, so no caller audit needed.1 parent ad924ad commit 0be9fc7
2 files changed
Lines changed: 39 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
| 14 | + | |
17 | 15 | | |
18 | 16 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
30 | 20 | | |
31 | 21 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
35 | 27 | | |
36 | 28 | | |
37 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
35 | 40 | | |
36 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
45 | | - | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | | - | |
49 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
50 | 72 | | |
51 | 73 | | |
52 | 74 | | |
53 | 75 | | |
54 | | - | |
| |||
0 commit comments