Skip to content
Snippets Groups Projects
Commit 2cdbbc1a authored by Davor Majdandzic's avatar Davor Majdandzic
Browse files

Competing network interfaces


NetworkRequest is expecting transport type Ethernet or test. This
causes the test 'testApiCallbacks' to fail for devices that have a
non-test Ethernet network since that network is being chosen instead of
the expected test Ethernet network.

Remove network capability TRANSPORT_ETHERNET from CaptivePortalApiTest.

Bug: 204329523
Test: atest android.net.cts.CaptivePortalApiTest#testApiCallbacks

Signed-off-by: default avatarDavor Majdandzic <davor.majdandzic@aptiv.com>
Change-Id: Ie7b4d00c08f1497044e63462f1d899d1f3dea2df
parent 0f56af41
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,6 @@ import android.net.EthernetManager
import android.net.InetAddresses
import android.net.NetworkCapabilities.NET_CAPABILITY_CAPTIVE_PORTAL
import android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED
import android.net.NetworkCapabilities.TRANSPORT_ETHERNET
import android.net.NetworkCapabilities.TRANSPORT_TEST
import android.net.NetworkRequest
import android.net.TestNetworkInterface
......@@ -96,7 +95,6 @@ class NetworkValidationTest {
private val ethRequest = NetworkRequest.Builder()
// ETHERNET|TEST transport networks do not have NET_CAPABILITY_TRUSTED
.removeCapability(NET_CAPABILITY_TRUSTED)
.addTransportType(TRANSPORT_ETHERNET)
.addTransportType(TRANSPORT_TEST).build()
private val ethRequestCb = TestableNetworkCallback()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment