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

Skip to content
Commit 28e6368e authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

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
parent d7864f4f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment