Fix broken FoldAodAnimationControllerTest test

Execute main thread executor runnables
in the correct order in the test.

Bug: 262889647
Test: atest com.android.systemui.unfold.FoldAodAnimationControllerTest
Change-Id: Ifbae4c291cd45d60cb8393a7bace616fb5d3331f
This commit is contained in:
Nick Chameyev
2022-12-21 11:49:09 +00:00
parent 8118ea49ef
commit b60f182a68

View File

@@ -171,8 +171,10 @@ class FoldAodAnimationControllerTest : SysuiTestCase() {
fold()
underTest.onScreenTurningOn({})
underTest.onStartedWakingUp()
// The body of onScreenTurningOn is executed on fakeExecutor,
// run all pending tasks before calling the next method
fakeExecutor.runAllReady()
underTest.onStartedWakingUp()
verify(latencyTracker).onActionStart(any())
verify(latencyTracker).onActionCancel(any())