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

Skip to content
Commit 7e1bed5a authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Clear mocks in tests

Inline mocks were leaking and the accumulation of all of them throughout
all our test led to OOM.

In order to prevent memory leak
(https://github.com/mockito/mockito/issues/1614), use suggested fix in tests
(https://github.com/mockito/mockito/wiki/What's-new-in-Mockito-2#mockito-2250).

This fix uncovered a handful of leaked Handlers. Mitigated by removing
cleaning up on teardown, but they probably should be injected in the
future so we can directly use a TestableLooper (or an executor).

Test: atest SystemUITests
Fixes: 212492048
Change-Id: I108be93088d56863aa7dae5482229b74133d3105
parent f8660097
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