From c408601c24b419f7c63b67d256ea3050cbc46bcc Mon Sep 17 00:00:00 2001 From: Owain Davies Date: Thu, 14 Apr 2016 16:12:38 +0100 Subject: [PATCH] Add assertion message if testDns ipv6 lookup reutrns ipv4. Some partner test networks connect by VPN and if the connection fails during the testing this test will fail as the local internet provider intercepts the DNS request and returns an ipv4 address. Added a message to check the network configuration and rerun the test. Bug: 26560000 Change-Id: I54e4976b2cef549bfe9fd55ff9609ba2e6513239 --- tests/cts/net/src/android/net/cts/DnsTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cts/net/src/android/net/cts/DnsTest.java b/tests/cts/net/src/android/net/cts/DnsTest.java index 0377d048e7..6dd8520395 100644 --- a/tests/cts/net/src/android/net/cts/DnsTest.java +++ b/tests/cts/net/src/android/net/cts/DnsTest.java @@ -96,7 +96,8 @@ public class DnsTest extends AndroidTestCase { if (DBG) Log.e(TAG, "ipv6.google.com gave " + addr.toString()); } - assertTrue(foundV4 == false); + assertTrue("[RERUN] ipv6.google.com returned an ipv4 address, check your network's DNS connection.", + foundV4 == false); assertTrue(foundV6 == true); assertTrue(testNativeDns());