Two fixes for Windows-specific sync test failures observed in CI run
58479384622:
1. Add 30-second read timeout to sync server TCP connections
(cli/sync_server.rs). The server handles connections sequentially;
without a timeout, a stalled TCP connection blocks read() indefinitely,
starving subsequent connections. Reproduced on Windows 11: without
the fix tests hang; with the timeout all 9 sync tests pass (277s
as timeouts fire and recover). Linux is unaffected due to cleaner
TCP teardown.
2. Add Windows WSAEADDRINUSE (os error 10048) to the port retry check
in tests/utils.py. Windows reports this error code instead of the
Unix "address already in use" string when a port is still in
TIME_WAIT.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On Windows, randomly chosen ports can land in OS-reserved ranges
(Hyper-V, WinNAT), causing "os error 10013" (permission denied).
Retry server startup with a different port up to 5 times when a
port-binding error is detected.
The health check loop polled the HTTP endpoint for 30s without ever
checking whether the server process was still alive. If the server
crashed on startup (e.g. port collision), the test silently burned
the full timeout getting "connection refused" before reporting a
useless error.
Check process liveness each iteration so we fail immediately with
the actual exit code and stderr output.
The test_bootstrap_concurrency test hangs indefinitely on Windows because
multiprocessing.Barrier.wait() and Process.join() have no timeouts. Also
add a 30s deadline to the TursoServer startup wait loop and per-request
timeouts to requests.get().