diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-07-10 01:55:11 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-07-10 01:55:11 +0000 |
commit | 696f9eea14613069104a8ddceb1b5658925389e3 (patch) | |
tree | 9b2f2d04ff3568cc26f37eb858f419d38a6bc561 /tests | |
parent | 9cd0bcd5a948d02c696c50c287a60263085a8d78 (diff) | |
parent | edb87e0f55153ee1b8203097332c3af5b458b947 (diff) |
Merge "wifi: remove cached hal data on updating a network" into rvc-dev am: 2022b51e1b am: edb87e0f55
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12084866
Change-Id: I25dde0d3daf8af0e30bfbfdd9c8ea673ec421c19
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(); |