Commit a951e748 authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Fix failing socket tests.

Use bogus numeric addresses instead of invalid hostnames to make
InetAddress.getAllByName fail before we ask a DNS server. This guards
against flakiness caused by evil DNS servers.

Note that from an API perspective, Socket* and SSLSocket* don't care
about *why* getAllByName failed, just that it did.

This change also fixes a test that was asserting that the exception we
throw contains a useful error message. Again, this test was changed
to use a broken numeric address.

bug: 18575971

(cherry picked from commit 83b55541)

Change-Id: Ia1c521c05634ce798a61b060f4d3fbbc164bb9fc
parent 3eb44e34
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment