Remove broken test testRfc6724Sort
This test is conitnuely fail in cuttlefish. Lack of ipv6 default route in cuttlefish caused the test failed. The reason is that the result of rfc6724Sort depends on on the route in system. It is not good to expect any route should exists, so remove it. Bug: 133649648 Test: atest DnsUtilsTest Merged-In: Idc6db433585de067e45088b43665c8e37b310397 (cherry picked from commit 91b35f88429d77ddce0e3f539690e6370b89915b) Change-Id: Idb6f4c094d3466772e3bfc98a57505bf38f381ef
This commit is contained in:
@@ -19,7 +19,6 @@ package android.net.util;
|
|||||||
import static android.net.util.DnsUtils.IPV6_ADDR_SCOPE_GLOBAL;
|
import static android.net.util.DnsUtils.IPV6_ADDR_SCOPE_GLOBAL;
|
||||||
import static android.net.util.DnsUtils.IPV6_ADDR_SCOPE_LINKLOCAL;
|
import static android.net.util.DnsUtils.IPV6_ADDR_SCOPE_LINKLOCAL;
|
||||||
import static android.net.util.DnsUtils.IPV6_ADDR_SCOPE_SITELOCAL;
|
import static android.net.util.DnsUtils.IPV6_ADDR_SCOPE_SITELOCAL;
|
||||||
import static android.net.util.DnsUtils.rfc6724Sort;
|
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
@@ -55,24 +54,6 @@ public class DnsUtilsTest {
|
|||||||
srcAddr != null ? stringToAddress(srcAddr) : null);
|
srcAddr != null ? stringToAddress(srcAddr) : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testRfc6724Sort() {
|
|
||||||
final List<InetAddress> testAddresses = Arrays.asList(
|
|
||||||
stringToAddress("172.217.24.14"),
|
|
||||||
stringToAddress("216.58.200.46"),
|
|
||||||
stringToAddress("2404:6800:4008:802::200e"));
|
|
||||||
|
|
||||||
final List<InetAddress> expected = Arrays.asList(
|
|
||||||
stringToAddress("2404:6800:4008:802::200e"),
|
|
||||||
stringToAddress("172.217.24.14"),
|
|
||||||
stringToAddress("216.58.200.46"));
|
|
||||||
|
|
||||||
final List<InetAddress> result = rfc6724Sort(null, testAddresses);
|
|
||||||
|
|
||||||
assertEquals(result.size(), testAddresses.size());
|
|
||||||
assertEquals(result, expected);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRfc6724Comparator() {
|
public void testRfc6724Comparator() {
|
||||||
final List<DnsUtils.SortableAddress> test = Arrays.asList(
|
final List<DnsUtils.SortableAddress> test = Arrays.asList(
|
||||||
|
|||||||
Reference in New Issue
Block a user