Merge "Fix test failure on S image + S module" am: d6446263ce am: b9b4c0678e
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2098019 Change-Id: Iff5cc8ed2a2709804bf2f0151c7929c10f8639f4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
3ff466a921
1 changed files with 10 additions and 8 deletions
|
|
@ -3235,14 +3235,16 @@ public class ConnectivityManagerTest {
|
|||
// TODD: Have a significant signal to know the uids has been sent to netd.
|
||||
assertBindSocketToNetworkSuccess(network);
|
||||
|
||||
// Uid is in allowed list. Try file network request again.
|
||||
requestNetwork(restrictedRequest, restrictedNetworkCb);
|
||||
// Verify that the network is restricted.
|
||||
restrictedNetworkCb.eventuallyExpect(CallbackEntry.NETWORK_CAPS_UPDATED,
|
||||
NETWORK_CALLBACK_TIMEOUT_MS,
|
||||
entry -> network.equals(entry.getNetwork())
|
||||
&& (!((CallbackEntry.CapabilitiesChanged) entry).getCaps()
|
||||
.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)));
|
||||
if (TestUtils.shouldTestTApis()) {
|
||||
// Uid is in allowed list. Try file network request again.
|
||||
requestNetwork(restrictedRequest, restrictedNetworkCb);
|
||||
// Verify that the network is restricted.
|
||||
restrictedNetworkCb.eventuallyExpect(CallbackEntry.NETWORK_CAPS_UPDATED,
|
||||
NETWORK_CALLBACK_TIMEOUT_MS,
|
||||
entry -> network.equals(entry.getNetwork())
|
||||
&& (!((CallbackEntry.CapabilitiesChanged) entry).getCaps()
|
||||
.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_RESTRICTED)));
|
||||
}
|
||||
} finally {
|
||||
agent.unregister();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue