SceneFrameworkIntegrationTest does not need runCurrent
This does not switch to UnconfinedDispatcher. Instead, it uses
several idioms to guarantee that runCurrent is called at the right
times:
- currentValue(StateFlow): this is already introduced, but now
used consistently
- verifyCurrent(mock) for advancing tasks before verifying a mock
- currentValue { block } for clearly scoping other value retrievals
that require advancement
Note: this accomplishes similar goals to ag/30532049, but with
fewer novel/bold/clever/intrusive patterns.
See go/thetiger for context
Bug: 342622417
Test: SceneFrameworkIntegrationTest
Flag: TEST_ONLY
Change-Id: Ideda9a26eb604ddf5d329ce45f5ebae0e011b3d9
Loading
Please register or sign in to comment