diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-07-10 01:33:49 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-07-10 01:33:49 +0000 |
commit | 2022b51e1bf7fb88a409998b2bd31eaabe227e03 (patch) | |
tree | 924b68779eb6b54f2843d9c292029a70d4f42b92 /tests | |
parent | d55cade0f9240ba70fd0fc6ed5e7458375740646 (diff) | |
parent | 1cc4d564f2e0901c9f44211ff60958ab0471f363 (diff) |
Merge "wifi: remove cached hal data on updating a network" into rvc-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index 11ee5cd7c..23726786d 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -5237,6 +5237,20 @@ public class ClientModeImplTest extends WifiBaseTest { verify(mWifiNative, never()).removeNetworkCachedData(anyInt()); } + /** + * Verify that network cached data is cleared on updating a network. + */ + @Test + public void testNetworkCachedDataIsClearedOnUpdatingNetwork() throws Exception { + WifiConfiguration oldConfig = new WifiConfiguration(mConnectedNetwork); + mConnectedNetwork.meteredOverride = METERED_OVERRIDE_METERED; + + mConfigUpdateListenerCaptor.getValue().onNetworkUpdated(mConnectedNetwork, oldConfig); + mLooper.dispatchAll(); + verify(mWifiNative).removeNetworkCachedData(eq(oldConfig.networkId)); + } + + @Test public void testIpReachabilityLostAndRoamEventsRace() throws Exception { connect(); |