Fixing flakiness of KeyboardTouchpadTutorialViewModelTest
Test was sometimes failing because of using LifecycleRegistry with provided LifecycleOwner - owner is held by registry by WeakReference only. Because it wasn't referenced anywhere else, sometimes it would be garbage collected before our `lifecycle.handleLifecycleEvent()` calls. Instead let's just call lifecycle methods directly to avoid using lifecycle-related objects and depend on them. More info in b/376676384 Fixes: 376676384 Test: KeyboardTouchpadTutorialViewModelTest with added System.gc() calls Flag: EXEMPT test fix Change-Id: I3605396e2deb8f9dcdf8eab5ad87fb34ab8cc9f3
Loading
Please register or sign in to comment