diff options
author | Guang Zhu <guangzhu@google.com> | 2017-08-05 00:05:17 +0000 |
---|---|---|
committer | Guang Zhu <guangzhu@google.com> | 2017-08-05 00:05:17 +0000 |
commit | 80061fc40ae7e1ead239364eeb1e3ea0d88bcc23 (patch) | |
tree | f3e26c2756acba40ffd18eaed4387d832dcaee0b /tests | |
parent | 899b14464fc6591010a5893142b470a466598f96 (diff) |
Revert "HalDeviceManager: Get IWifi proxy immediately"
Bug: 64399946
Bug: 64226605
This reverts commit 899b14464fc6591010a5893142b470a466598f96.
Change-Id: I2af550600529835fa78e7011f1bbedd056140d46
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java b/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java index 54c67b222..3e203a666 100644 --- a/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/HalDeviceManagerTest.java @@ -164,22 +164,6 @@ public class HalDeviceManagerTest { } /** - * Test the service manager notification coming in after - * {@link HalDeviceManager#initIWifiIfNecessary()} is already invoked as a part of - * {@link HalDeviceManager#initialize()}. - */ - @Test - public void testServiceRegisterationAfterInitialize() throws Exception { - mInOrder = inOrder(mServiceManagerMock, mWifiMock, mManagerStatusListenerMock); - executeAndValidateInitializationSequence(); - - // This should now be ignored since IWifi is already non-null. - mServiceNotificationCaptor.getValue().onRegistration(IWifi.kInterfaceName, "", true); - - verifyNoMoreInteractions(mManagerStatusListenerMock, mWifiMock, mServiceManagerMock); - } - - /** * Validate that multiple callback registrations are called and that duplicate ones are * only called once. */ @@ -237,7 +221,7 @@ public class HalDeviceManagerTest { // verify: service and callback calls mInOrder.verify(mWifiMock).start(); - mInOrder.verify(mManagerStatusListenerMock, times(2)).onStatusChanged(); + mInOrder.verify(mManagerStatusListenerMock, times(3)).onStatusChanged(); verifyNoMoreInteractions(mManagerStatusListenerMock); } @@ -1113,13 +1097,12 @@ public class HalDeviceManagerTest { mInOrder.verify(mServiceManagerMock).registerForNotifications(eq(IWifi.kInterfaceName), eq(""), mServiceNotificationCaptor.capture()); - // The service should already be up at this point. + // act: get the service started (which happens even when service was already up) + mServiceNotificationCaptor.getValue().onRegistration(IWifi.kInterfaceName, "", true); // verify: wifi initialization sequence mInOrder.verify(mWifiMock).linkToDeath(mDeathRecipientCaptor.capture(), anyLong()); mInOrder.verify(mWifiMock).registerEventCallback(mWifiEventCallbackCaptor.capture()); - // verify: onStop called as a part of initialize. - mInOrder.verify(mWifiMock).stop(); collector.checkThat("isReady is true", mDut.isReady(), equalTo(true)); } |