diff options
author | Oscar Shu <xshu@google.com> | 2020-03-31 17:20:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-31 17:20:53 +0000 |
commit | fb2b258c11c0685f33e5d92ae6a6f37649ab5b0f (patch) | |
tree | 8884eeeff1cbf3dd7f734fd0eacc580a2d2aba08 /tests | |
parent | b98ca721f6efed2fe85c07153e05e6410e741af4 (diff) | |
parent | 80a67d1ff05a0bdeb990b35f3e1588a83e174374 (diff) |
Merge "Treat BSSIDs blocked by MBO same as other BSSIDs" into rvc-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/BssidBlocklistMonitorTest.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/BssidBlocklistMonitorTest.java b/tests/wifitests/src/com/android/server/wifi/BssidBlocklistMonitorTest.java index 00afa91f1..2567faa91 100644 --- a/tests/wifitests/src/com/android/server/wifi/BssidBlocklistMonitorTest.java +++ b/tests/wifitests/src/com/android/server/wifi/BssidBlocklistMonitorTest.java @@ -628,14 +628,15 @@ public class BssidBlocklistMonitorTest { when(mClock.getWallClockMillis()).thenReturn(0L); long testDuration = 5500L; mBssidBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, TEST_SSID_1, testDuration); + assertEquals(1, mBssidBlocklistMonitor.updateAndGetBssidBlocklist().size()); - // Verify that the BSSID is not removed from blocklist dispite of regular "clear" calls. - when(mClock.getWallClockMillis()).thenReturn(testDuration); - mBssidBlocklistMonitor.clearBssidBlocklist(); + // Verify that the BSSID is removed from blocklist by clearBssidBlocklistForSsid mBssidBlocklistMonitor.clearBssidBlocklistForSsid(TEST_SSID_1); - Set<String> bssidList = mBssidBlocklistMonitor.updateAndGetBssidBlocklist(); - assertEquals(1, bssidList.size()); - assertTrue(bssidList.contains(TEST_BSSID_1)); + assertEquals(0, mBssidBlocklistMonitor.updateAndGetBssidBlocklist().size()); + + // Add the BSSID to blocklist again. + mBssidBlocklistMonitor.blockBssidForDurationMs(TEST_BSSID_1, TEST_SSID_1, testDuration); + assertEquals(1, mBssidBlocklistMonitor.updateAndGetBssidBlocklist().size()); // Verify that the BSSID is removed from blocklist once the specified duration is over. when(mClock.getWallClockMillis()).thenReturn(testDuration + 1); |