Skip to content

Conversation

@abeyad
Copy link
Contributor

@abeyad abeyad commented Dec 4, 2025

This change does two things:

  1. Creates a new MockDnsResolver that can be used for mobile integration tests setting the host to a non-local host.
  2. Updates ClientIntegrationTest to use the MockDnsResolver for tests that attempt to connect to a non-existant host.

The MockDnsResolver treats localhost addresses like a standard DNS resolver would, but for the configured "non-existant" hosts, it returns an empty DNS record (EAI_NONAME) without attempting to go on the wire to fetch the host's DNS records. This saves test time and makes for a more hermetic test.

This change does two things:
  1. Creates a new MockDnsResolver that can be used for mobile
     integration tests setting the host to a non-local host.
  2. Updates ClientIntegrationTest to use the MockDnsResolver for tests
     that attempt to connect to a non-existant host.

The MockDnsResolver treats localhost addresses like a standard DNS
resolver would, but for the configured "non-existant" hosts, it returns
an empty DNS record (EAI_NONAME) without attempting to go on the wire to
fetch the host's DNS records. This saves test time and makes for a more
hermetic test.

Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad
Copy link
Contributor Author

abeyad commented Dec 4, 2025

/assign @phlax

Signed-off-by: Ali Beyad <abeyad@google.com>
@abeyad abeyad enabled auto-merge (squash) December 4, 2025 23:25
@abeyad
Copy link
Contributor Author

abeyad commented Dec 4, 2025

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants