89901c4bde80282b02a786e580f9bc75984bd4de |
|
23-Feb-2016 |
Rebecca Silberstein <silberst@google.com> |
Create blocking call for AutoDispatch test. Add a blocking call to the testAutoDispatchWithSingleMessage test in MockLooperTest. AutoDispatch is not intended to be used with non blocking calls and this corrects the test. BUG=27278081 Change-Id: I783f763a1b438bf307484276436497e534be3906
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooperTest.java
|
d0846fa841b604ccb969c54b45367fa2bececf83 |
|
16-Feb-2016 |
Rebecca Silberstein <silberst@google.com> |
Add Looper param to WifiStateMachine constructor and AutoDispatch Add Looper to the WifiStateMachine constructor. This allows unittests to pass a MockLooper and control how messages are dispatched. This change allows the wait() calls to be removed from the WifiStateMachineTest tests and will bring stability to test runs. This change will also reduce test run time. Due to the blocking calls in WifiStateMachine that are expecting a response, also implement AutoDispatch functionality for MockLooper. This functionality is implemented by creating a thread that calls MockLooper.dispatchAll when messages are available. Once at least one message is dispatched, the thread will exit. The thread will attempt a limited number of times and log an error if no messages are dispatched. BUG=26943243 Change-Id: Ia892303e04d18c56d7f1d896db6098e7c3bd9607
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooperTest.java
|
b35c2105231b61606db78d4bf8a75ec31039db61 |
|
11-Jan-2016 |
Etan Cohen <etancohen@google.com> |
Merge the MockLooperAbstractTime functionality into baseline MockLooper The time functionality (post delayed event) of MockLooperAbstractTime is additive: i.e. base functionality (without posting delayed or moving time) is identical to MockLooper - hence no need to have a separate class. Change-Id: I01ae48712534a4c08003a5a6271a66c8c9bf984c
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooperTest.java
|