Prevent ArtServiceTests Mockito strictness from masking test error
The finishMocking logic should only be run if no exception was thrown
by the test. Otherwise the strictness violation could mask any real
test errors and make the logs less useful.
This moves it out of the finally block and makes it mirror the original
MockitoRule, passing the Exception into Mockito so that it can skip
the validation logic if another error was encountered.
Test: atest ArtServiceTests
Ignore-AOSP-First: ART Services.
Change-Id: I499356f49bb4e3325de38959c5d2609bc95c0486
1 file changed