Merge "Merge "Added assertion message to testDns failures" into lollipop-mr1-cts-dev am: 350b2aa" into marshmallow-cts-dev am: 936375b am: 2bfd0e1 am: 2a0f366 am: 39cb9a5 am: 7cde9a8
am: 6d3841c
* commit '6d3841c6a577d23fc4be40b7b6cdd57074ebb589':
Added assertion message to testDns failures
Change-Id: Iefa78714f2819ba10668b2698903912472aed98a
This commit is contained in:
@@ -62,7 +62,8 @@ public class DnsTest extends AndroidTestCase {
|
|||||||
try {
|
try {
|
||||||
addrs = InetAddress.getAllByName("www.google.com");
|
addrs = InetAddress.getAllByName("www.google.com");
|
||||||
} catch (UnknownHostException e) {}
|
} catch (UnknownHostException e) {}
|
||||||
assertTrue(addrs.length != 0);
|
assertTrue("[RERUN] DNS could not resolve www.gooogle.com. Check internet connection",
|
||||||
|
addrs.length != 0);
|
||||||
boolean foundV4 = false, foundV6 = false;
|
boolean foundV4 = false, foundV6 = false;
|
||||||
for (InetAddress addr : addrs) {
|
for (InetAddress addr : addrs) {
|
||||||
if (addr instanceof Inet4Address) foundV4 = true;
|
if (addr instanceof Inet4Address) foundV4 = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user