Commit 44ac42c
authored
Tests: Avoid DNS lookup in freshclam mock mirror (#1763)
The freshclam tests start a local HTTP server in a child process and wait
for a readiness message before running freshclam. On newer macOS runners,
the standard HTTPServer startup can stall while resolving the bound loopback
address to a fully-qualified name, so the child process never reports
readiness and the tests time out before freshclam is exercised.
Use a test-only HTTPServer subclass that binds through
TCPServer.server_bind() and records the bound address directly. The mock
mirror does not need reverse DNS, and avoiding it keeps startup dependent
only on the local socket bind.1 parent 6c1d28b commit 44ac42c
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
| |||
861 | 872 | | |
862 | 873 | | |
863 | 874 | | |
864 | | - | |
| 875 | + | |
865 | 876 | | |
866 | 877 | | |
867 | 878 | | |
| |||
0 commit comments