Merge "Updating timeout for Per-App CTS"

This commit is contained in:
James Mattis
2021-06-21 17:17:13 +00:00
committed by Gerrit Code Review

View File

@@ -2212,7 +2212,8 @@ public class ConnectivityManagerTest {
// Validate when setting unmetered to metered, unmetered is lost and replaced by the // Validate when setting unmetered to metered, unmetered is lost and replaced by the
// network with the TEST transport. // network with the TEST transport.
setWifiMeteredStatusAndWait(ssid, true /* isMetered */); setWifiMeteredStatusAndWait(ssid, true /* isMetered */);
defaultCallback.expectCallback(CallbackEntry.LOST, wifiNetwork); defaultCallback.expectCallback(CallbackEntry.LOST, wifiNetwork,
NETWORK_CALLBACK_TIMEOUT_MS);
waitForAvailable(defaultCallback, tnt.getNetwork()); waitForAvailable(defaultCallback, tnt.getNetwork());
// Depending on if this device has cellular connectivity or not, multiple available // Depending on if this device has cellular connectivity or not, multiple available
// callbacks may be received. Eventually, metered Wi-Fi should be the final available // callbacks may be received. Eventually, metered Wi-Fi should be the final available
@@ -2222,7 +2223,8 @@ public class ConnectivityManagerTest {
} finally { } finally {
// Validate that removing the test network will fallback to the default network. // Validate that removing the test network will fallback to the default network.
runWithShellPermissionIdentity(tnt::teardown); runWithShellPermissionIdentity(tnt::teardown);
defaultCallback.expectCallback(CallbackEntry.LOST, tnt.getNetwork()); defaultCallback.expectCallback(CallbackEntry.LOST, tnt.getNetwork(),
NETWORK_CALLBACK_TIMEOUT_MS);
waitForAvailable(defaultCallback); waitForAvailable(defaultCallback);
setWifiMeteredStatusAndWait(ssid, oldMeteredValue); setWifiMeteredStatusAndWait(ssid, oldMeteredValue);
@@ -2258,7 +2260,8 @@ public class ConnectivityManagerTest {
waitForAvailable(systemDefaultCallback, wifiNetwork); waitForAvailable(systemDefaultCallback, wifiNetwork);
} finally { } finally {
runWithShellPermissionIdentity(tnt::teardown); runWithShellPermissionIdentity(tnt::teardown);
defaultCallback.expectCallback(CallbackEntry.LOST, tnt.getNetwork()); defaultCallback.expectCallback(CallbackEntry.LOST, tnt.getNetwork(),
NETWORK_CALLBACK_TIMEOUT_MS);
// This network preference should only ever use the test network therefore available // This network preference should only ever use the test network therefore available
// should not trigger when the test network goes down (e.g. switch to cellular). // should not trigger when the test network goes down (e.g. switch to cellular).