summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2018-03-20 02:19:33 -0700
committerRebecca Silberstein <silberst@google.com>2018-03-30 16:22:19 -0700
commit48aeddaf3b150d810f2a93da658e40824a99ae2a (patch)
tree238a75e22c10285115e3bdcc4db347c60283d481 /tests
parentf5cb5bac214538854dcb0a552fb984926950ba7f (diff)
WifiStateMachine: remove SupplicantStartingState
Since WifiNative handles starting supplicant, client mode no longer needs to wait for supplicant connection events, just go to SupplicantStartedState. Note: SupplicantStartedState is a transitional state that will also be removed in a follow-on CL. Bug: 31346104 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Test: manually verified wifi connects in client mode by toggling Change-Id: Ie8265bde9ae708d80e119734234e78f5a2e6500d
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java22
1 files changed, 4 insertions, 18 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
index 0889f677c..d3ac5414b 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java
@@ -637,7 +637,7 @@ public class WifiStateMachineTest {
// But if someone tells us to enter connect mode, we start up supplicant
mWsm.setOperationalMode(WifiStateMachine.CONNECT_MODE);
mLooper.dispatchAll();
- assertEquals("SupplicantStartingState", getCurrentState().getName());
+ assertEquals("DisconnectedState", getCurrentState().getName());
}
/**
@@ -852,7 +852,7 @@ public class WifiStateMachineTest {
}
/**
- * Helper method to move through SupplicantStarting and SupplicantStarted states.
+ * Helper method to move through startup states.
*/
private void startSupplicantAndDispatchMessages() throws Exception {
mWsm.setOperationalMode(WifiStateMachine.CONNECT_MODE);
@@ -861,25 +861,11 @@ public class WifiStateMachineTest {
// this will be removed when interface management is dynamic
verify(mWifiNative, atLeastOnce()).teardownAllInterfaces();
- assertEquals("SupplicantStartingState", getCurrentState().getName());
-
- when(mWifiNative.setDeviceName(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setManufacturer(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setModelName(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setModelNumber(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setSerialNumber(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setConfigMethods(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setDeviceType(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setSerialNumber(eq(WIFI_IFACE_NAME), anyString())).thenReturn(true);
- when(mWifiNative.setScanningMacOui(eq(WIFI_IFACE_NAME), any(byte[].class)))
- .thenReturn(true);
-
- mWsm.sendMessage(WifiMonitor.SUP_CONNECTION_EVENT);
- mLooper.dispatchAll();
-
verify(mWifiNative, atLeastOnce())
.setupInterfaceForClientMode(eq(false), mInterfaceCallbackCaptor.capture());
verify(mWifiLastResortWatchdog, atLeastOnce()).clearAllFailureCounts();
+
+ assertEquals("DisconnectedState", getCurrentState().getName());
}
private void addNetworkAndVerifySuccess(boolean isHidden) throws Exception {