Repository navigation
Pin localhost to 127.0.0.1 in the test clients - #223
Merged
Merged
Conversation
The synthetic peers listen on 127.0.0.1 and hold a certificate for localhost, so the tests connect by that name. On the macOS CI host the IPv6 loopback answer came first and the attempt on it was left to time out before IPv4 was tried: ten seconds a connection, and the lib suite took ten minutes there against thirty-five seconds locally. The test clients now resolve the name to the address the peer has; the certificate is still checked against the name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
huacnlee
added a commit
that referenced
this pull request
Sep 15, 2026
That was not where the time went: the macOS job still took 21 minutes with the pin in place. The synthetic peers' bind-time reverse lookup was, and the previous commit removes it. This reverts commit 82b14d7. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
huacnlee
added a commit
that referenced
this pull request
Sep 15, 2026
The macOS CI job spends ~615 seconds in the lib test suite that takes 35 seconds locally, all of it in tests that start a Python `http.server.HTTPServer` as their synthetic JMAP peer (`backend::mail::action_tests`, the discovery tests). `HTTPServer.server_bind` calls `socket.getfqdn(host)` on the bound address: a reverse DNS lookup of `127.0.0.1` that the runner's resolver leaves to time out, about ten seconds per server start. A test with five scenarios starts five peers and pays it five times — the "has been running for over 60 seconds" lines in the log. The two peers now bind through a subclass that skips the lookup. #223 pinned `localhost` in the Rust test clients on the theory that the IPv6 loopback attempt was timing out; its job still took 21 minutes, so that change is reverted here rather than left in with a wrong explanation attached. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS CI job spent 615 seconds in the lib test suite that takes 35 seconds locally. The job log shows the time in
backend::mail::action_testsand the other synthetic-peer tests, in gaps of 12, 24, 36… seconds: one 10-secondconnect_timeoutper new connection.The peers listen on
127.0.0.1with a certificate forlocalhost, and the tests connect by name. On the runner the IPv6 loopback address is answered first and the connection attempt on it is left to time out before IPv4 is tried.A
#[cfg(test)]helper pinslocalhostto127.0.0.1on every test client (resolve(), so the certificate is still verified against the name), applied in the JMAP and Gmailclient_builder()s and the two ad-hoc report clients. No production code path changes.Expected effect: the macOS standalone app job drops from ~19 minutes to under ten. Together with #222 (dependency caching) the remaining time is the release build and Qt.
🤖 Generated with Claude Code