Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d6455281 authored by Rambo Wang's avatar Rambo Wang Committed by Nathan Harold
Browse files

DeviceStateMonitor and unit test polish

DeviceStateMonitorTest has @FlakyTest cases which get undetermistic
result when test in different context.

This CL remove those flakiness by
- Initializing all states to off to have a determistic starting point.
- Reseting mSimulatedCommandsVerifier to eliminate the accumuated
  impact of Mockito.verify() on the follow test cases.

This CL also
- Add missing debug info of log and dumpstate for DeviceStateMonitor.
- Add more test cases to cover more methods.
- Clear up unused fields and comments for DeviceStateMonitor.
- Remove hard-codes with constants in DeviceStateMonitorTest.
- Pass all test cases in both Cuttlefish and Pixel3 phone.

Bug: 149223121
Test: atest DeviceStateMonitorTest
Merged-In: I987407ef812c83b10b84ba59c1f4010a0d27c143
Change-Id: I987407ef812c83b10b84ba59c1f4010a0d27c143
(cherry picked from commit 347835b6)
parent 488bc727
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment