diff options
author | Ningyuan Wang <nywang@google.com> | 2017-09-18 15:18:45 -0700 |
---|---|---|
committer | Ningyuan Wang <nywang@google.com> | 2017-10-04 18:07:05 -0700 |
commit | 470817b13e56d915805729ab4f51075f3fa2ec15 (patch) | |
tree | e1bc495d0755892089954aebf87001c4f18f5e31 /tests | |
parent | 70954f46ffb95cbf3d6c9d12495be20edf2b3530 (diff) |
Blame scan request from WifiManager.reconnect()
Bug: 65839442
Test: compile, unit tests
Test:
1. Write a simple cts test case WifiManagerTest#testWifiReconnect
only calling WifiManager.reconnect()
2. Make sure wifi is disconnected
3. Run cts test using:
cts-tradefed run cts -m CtsNetTestCases -t
android.net.wifi.cts.WifiManagerTest#testWifiReconnect
4. Grab bugreport
5. Verify the following logs appears:
forceConnectivityScan in request of WorkSource{...}
Change-Id: I7fa7803e90ba950c9331a55cb1268baef4ae02a8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java index 5fb700720..4fabd9d1e 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConnectivityManagerTest.java @@ -1178,7 +1178,7 @@ public class WifiConnectivityManagerTest { // Force a connectivity scan which enables WifiConnectivityManager // to wait for full band scan results. - mWifiConnectivityManager.forceConnectivityScan(); + mWifiConnectivityManager.forceConnectivityScan(WIFI_WORK_SOURCE); // No roaming because no full band scan results. verify(mWifiStateMachine, times(0)).startConnectToNetwork( @@ -1189,7 +1189,7 @@ public class WifiConnectivityManagerTest { // Force a connectivity scan which enables WifiConnectivityManager // to wait for full band scan results. - mWifiConnectivityManager.forceConnectivityScan(); + mWifiConnectivityManager.forceConnectivityScan(WIFI_WORK_SOURCE); // Roaming attempt because full band scan results are available. verify(mWifiStateMachine).startConnectToNetwork( @@ -1286,14 +1286,14 @@ public class WifiConnectivityManagerTest { // its blacklist expiration time hasn't reached yet. when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime() + WifiConnectivityManager.BSSID_BLACKLIST_EXPIRE_TIME_MS / 2); - mWifiConnectivityManager.forceConnectivityScan(); + mWifiConnectivityManager.forceConnectivityScan(WIFI_WORK_SOURCE); assertTrue(mWifiConnectivityManager.isBssidDisabled(bssid)); // Force another connectivity scan at BSSID_BLACKLIST_EXPIRE_TIME_MS from when the // BSSID was blacklisted. Verify that the blacklisted BSSId is freed. when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime() + WifiConnectivityManager.BSSID_BLACKLIST_EXPIRE_TIME_MS); - mWifiConnectivityManager.forceConnectivityScan(); + mWifiConnectivityManager.forceConnectivityScan(WIFI_WORK_SOURCE); // Verify the BSSID is no longer blacklisted. assertFalse(mWifiConnectivityManager.isBssidDisabled(bssid)); |