Merge \\\"Log the address of the IPv4 address that causes the test to fail.\\\" into nyc-dev am: db3485a45e am: d1970e861b

am: 3716ad889d

Change-Id: Ic016cc7fd099207f22683c74eaffe92221a1f74b
This commit is contained in:
Lorenzo Colitti
2016-06-09 07:59:02 +00:00
committed by android-build-merger

View File

@@ -89,17 +89,15 @@ public class DnsTest extends AndroidTestCase {
addrs = InetAddress.getAllByName("ipv6.google.com");
} catch (UnknownHostException e) {}
assertTrue(addrs.length != 0);
foundV4 = false;
foundV6 = false;
for (InetAddress addr : addrs) {
if (addr instanceof Inet4Address) foundV4 = true;
else if (addr instanceof Inet6Address) foundV6 = true;
assertFalse ("[RERUN] ipv6.google.com returned IPv4 address: " + addr.getHostAddress() +
", check your network's DNS connection", addr instanceof Inet4Address);
foundV6 |= (addr instanceof Inet6Address);
if (DBG) Log.e(TAG, "ipv6.google.com gave " + addr.toString());
}
assertTrue("[RERUN] ipv6.google.com returned an ipv4 address, check your network's DNS connection.",
foundV4 == false);
assertTrue(foundV6 == true);
assertTrue(foundV6);
assertTrue(testNativeDns());
}