Commit 7f14c6a
test(ttlcache): de-flake TestCache_Expiry timing under parallel CI load
The t.Parallel test used TTL=10ms with a 20ms post-TTL sleep, a margin too
tight when the scheduler pauses the goroutine under CI load. Raise the TTL
to 50ms and sleep 5x past it (named const), keeping the test fast (~250ms)
while removing the nondeterminism Copilot flagged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 4d75c2e commit 7f14c6a
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
90 | 93 | | |
91 | | - | |
| 94 | + | |
92 | 95 | | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
100 | | - | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
0 commit comments