Commit f4ecc31
test(waterdata): close server-leak window in pool-timeout regression test
The ThreadingHTTPServer thread was started before the try block, so a
setup failure between thread.start() and the try (monkeypatch, decorator
construction) would leak the serve_forever thread and its bound socket —
the finally never ran. Move the try up to immediately after the thread
starts so teardown always fires. (server.shutdown() stays safe: it's only
reachable once serve_forever is running.)
Surfaced by the code-review sweep. No production change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 07b3381 commit f4ecc31
1 file changed
Lines changed: 16 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1583 | 1583 | | |
1584 | 1584 | | |
1585 | 1585 | | |
1586 | | - | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
1587 | 1590 | | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1593 | 1596 | | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
1600 | 1603 | | |
1601 | | - | |
1602 | | - | |
| 1604 | + | |
1603 | 1605 | | |
1604 | 1606 | | |
1605 | 1607 | | |
| |||
0 commit comments