Skip tests which need an IPv6 address on Cuttlefish.
Avoids:
android.net.cts.DnsTest#testDnsWorks: FAILED (4.993s)
STACKTRACE:
java.lang.AssertionError: Default network did not provide IPv6 connectivity after 5000ms. Please connect to an IPv6-capable network.
lp={InterfaceName: wlan0 LinkAddresses: [ fe80::6c1f:76ff:fe50:2c84/64,192.168.99.115/25 ] DnsAddresses: [ /192.168.99.1 ] Domains: l
an MTU: 0 ServerAddress: /192.168.99.1 TcpBufferSizes: 524288,1048576,2097152,262144,524288,1048576 Routes: [ fe80::/64 -> :: wlan0 m
tu 0,192.168.99.0/25 -> 0.0.0.0 wlan0 mtu 0,0.0.0.0/0 -> 192.168.99.1 wlan0 mtu 0 ]}
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.assertTrue(Assert.java:42)
at android.net.cts.DnsTest.ensureIpv6Connectivity(DnsTest.java:319)
at android.net.cts.DnsTest.testDnsWorks(DnsTest.java:90)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I4b94edae6d196ca02858702dec40ee2bad1db494
This commit is contained in:
parent
36e7969920
commit
7355ca14e5
1 changed files with 4 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ package android.net.cts;
|
|||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assume.assumeFalse;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
|
|
@ -26,6 +27,7 @@ import android.net.ConnectivityManager.NetworkCallback;
|
|||
import android.net.LinkProperties;
|
||||
import android.net.Network;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
|
|
@ -299,6 +301,8 @@ public class DnsTest {
|
|||
}
|
||||
|
||||
private void ensureIpv6Connectivity() throws InterruptedException {
|
||||
assumeFalse(Build.MODEL.contains("Cuttlefish"));
|
||||
|
||||
CountDownLatch latch = new CountDownLatch(1);
|
||||
final int TIMEOUT_MS = 5_000;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue