On Windows the Python sync tests took ~5 min per test file, against
~42 s on macOS. The time goes into connections, not work: e.g.
test_bootstrap 10.16 s on Windows vs 0.23 s on macOS, and
test_partial_sync_segment_size (many requests) 122.9 s vs 1.05 s, while
the data-heavy test_pull_bytes_threshold took about the same on both.
The local sync server listens on 0.0.0.0 (IPv4 only), but the tests
connected to "localhost". Windows resolves localhost to ::1 first, and a
refused connection there takes about 2 s before the client falls back to
127.0.0.1, on every new connection. That fits the numbers above; the
Windows CI timings of this change will confirm it.
Connect to 127.0.0.1 directly. The persisted-URL assertion now checks for
the server URL itself instead of the "http://localhost" prefix.
The Python test matrix used versions 3.10 and 3.14 on every run. The configure-strategy job returned those fixed values. The matrix now lists them directly.
Python sync tests need tursodb. CI now builds only that binary with cargo build -p turso_cli --bin tursodb --locked.
Each checkpoint test now commits after four inserts. It still writes 1,024 rows and checks for a WAL larger than 1 MiB.
Tests: The focused tursodb build and all 18 Python sync tests passed. The workflow YAML parsed.
The sync engine's full_write handler wrote the replica metadata file in
place with open(path, 'wb'), so a concurrent reader (another connection
opening the same replica) could observe an empty or truncated file and fail
with 'meta must be initialized before open' or a deserialization error.
Write to a temp file and os.replace() it over the target, matching the
atomic write the JavaScript binding already does.
Tests: test_concurrent_open_existing_replica (fails on the previous
truncate-in-place write, passes now)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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().