Repository navigation
Commit 80cf0d3
Make the DoT closed-connection test deterministic (#289)
TestDoTDiscardsClosedConnections slept 5 ms after each lookup and
hoped the server's close had reached the client before the next
lookup's one-millisecond alive probe; on a loaded machine it sometimes
had not, and a query went out on the dead connection (11 counted, want
10). A 200-run stress loop still failed once with only the server side
waited for.
The test now takes each pooled DoT connection, reads until it sees the
server's close, and puts it back, so the next lookup's probe always
finds it closed and the discard path is what gets tested. 500 runs in a
row pass.
Refs #289
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 09b2c04 commit 80cf0d3
1 file changed
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
219 | | - | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
229 | 266 | | |
230 | 267 | | |
231 | 268 | | |
| |||
0 commit comments