diff options
author | Rebecca Silberstein <silberst@google.com> | 2017-08-14 16:52:02 -0700 |
---|---|---|
committer | Rebecca Silberstein <silberst@google.com> | 2017-08-14 16:52:02 -0700 |
commit | ae6cc3065f240990b9600ca802af4f98b2df96cd (patch) | |
tree | f8ae916379af055d83d11acafb01850d47b9de45 /tests | |
parent | ff14f546b406ead034c70d09381c6dadb9a0062d (diff) |
WifiStateMachineTest: remove looper race
Two WifiStateMachineTest tests had a slight race when sending extra
messages to WSM after setting up the test condition. This CL removes
the extra mode message + internal state check.
Bug: 37358048
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I71356679d67ae2aafd68372ee75eff24af29eaf7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java index 5d5a5a6aa..be5892196 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiStateMachineTest.java @@ -2001,9 +2001,7 @@ public class WifiStateMachineTest { @Test public void testStartWps_nullWpsInfo() throws Exception { loadComponentsInStaMode(); - mWsm.setOperationalMode(WifiStateMachine.CONNECT_MODE); - assertEquals(WifiStateMachine.CONNECT_MODE, mWsm.getOperationalModeForTest()); - assertEquals("DisconnectedState", getCurrentState().getName()); + mLooper.startAutoDispatch(); Message reply = mWsmAsyncChannel.sendMessageSynchronously(WifiManager.START_WPS, 0, 0, null); @@ -2018,9 +2016,6 @@ public class WifiStateMachineTest { @Test public void testSyncDisableNetwork_failure() throws Exception { loadComponentsInStaMode(); - mWsm.setOperationalMode(WifiStateMachine.CONNECT_MODE); - assertEquals(WifiStateMachine.CONNECT_MODE, mWsm.getOperationalModeForTest()); - assertEquals("DisconnectedState", getCurrentState().getName()); when(mWifiConfigManager.disableNetwork(anyInt(), anyInt())).thenReturn(false); mLooper.startAutoDispatch(); |