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
Loading
Please register or sign in to comment