History log of /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/MockLooper.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/MockLooper.java
e1e1c7317e5e5d61daf90cd2f2861305f19890b7 08-Jan-2016 Etan Cohen <etancohen@google.com> Add/extend MockLooper to handled messages posted with a delay.

MockLooperAbstractTime allows moving time forward and dispatches
messages per the current time.

Change-Id: Ic87a609db86011b7b909353122fabe7cb440b61f
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooper.java
72c639e8b97067e948eca8be50dfea3173121090 04-Nov-2015 Mitchell Wills <mwills@google.com> Cleanup wifi tests style

Make all tests follow style defined in development/tools/checkstyle

Change-Id: I18b24956f4fdecde8f02ebcc9089065b4a5b7e68
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooper.java
41e38d84f562e12198f7db0d45f633712cae6cba 19-Nov-2015 Mitchell Wills <mwills@google.com> Tests for SupplicantWifiScannerImpl

Other small fixes/aids for testing
* deliver full scan results in the order they are returned from
supplicant
* Now use AlarmListener AlarmManager API instead of intents
* Use WifiChannelHelper instead of direct native calls

Change-Id: I3133a21162f598e5e5973ec67ebc9521a3a387ab
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/MockLooper.java