Test IPv6 and dual-stack entrypoints - #104
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds IPv6 and dual-stack discovery coverage for the synchronous client.
Changes:
- Tests IPv6 literal
/localnodesrequests and refresh behavior. - Tests IPv4/IPv6 DNS fallback and unavailable records.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tests/unit/test_sync_manager.py |
Covers refreshes through an IPv6 seed. |
tests/unit/test_http.py |
Adds IPv6 server and dual-stack HTTP tests. |
Suppressed comments (2)
tests/unit/test_http.py:321
- The process proxy configuration can intercept this URL. Because the unconditional
getaddrinfomock then resolves the proxy hostname to these records, the test can pass without resolving or directly connecting toentrypoint.test; force proxy bypass so it deterministically exercises the intended dual-stack endpoint resolution.
with patch("socket.getaddrinfo", return_value=records):
nodes = create_sync_http_fetcher(timeout_seconds=1.0)(
f"http://entrypoint.test:{server.server_port}/localnodes"
)
tests/unit/test_http.py:337
- With an ambient HTTP proxy, this patches resolution of the proxy rather than
entrypoint.test, so returning[]does not prove that the entrypoint's IPv4 and IPv6 records were exhausted. Explicitly bypass proxies while applying the DNS mock.
with patch("socket.getaddrinfo", return_value=records):
nodes = create_sync_http_fetcher(timeout_seconds=0.5)(
"http://entrypoint.test:9/localnodes"
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dkropachev
force-pushed
the
dk/driver-823-ipv6-dual-stack
branch
from
August 6, 2026 14:37
51a2d79 to
1cc6f5a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
tests/unit/test_http.py:265
- If IPv6-to-IPv4 fallback stops working, no request reaches this server and
handle_request()can remain blocked indefinitely. Sincejoin(timeout=2)does not terminate a non-daemon thread, this regression can hang the test process instead of producing a normal assertion failure; daemonize the one-shot thread (or configure a server timeout).
thread = Thread(target=server.handle_request)
tests/unit/test_http.py:304
- If IPv4-to-IPv6 fallback stops working, this non-daemon
handle_request()thread receives no request and may wait forever. The timedjoin()only stops waiting for it, so a failed test can hang the process; daemonize the one-shot thread (or configure a server timeout).
thread = Thread(target=server.handle_request)
dkropachev
force-pushed
the
dk/driver-823-ipv6-dual-stack
branch
from
August 6, 2026 14:53
1cc6f5a to
a5e7f45
Compare
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.
Jira task: https://scylladb.atlassian.net/browse/DRIVER-913
Jira epic: https://scylladb.atlassian.net/browse/DRIVER-823
Summary
/localnodesdiscoveryThe existing IPv6 URL and operation-routing tests continue to cover bracketed authorities.
Tests
make test-unitmake lint