commit | 78c603387aa57b73fe67a8a425f7fc51dd4989d4 | [log] [tgz] |
---|---|---|
author | Eric Jeong <ericjeong@google.com> | Tue Feb 21 16:50:50 2023 -0800 |
committer | Eric Jeong <ericjeong@google.com> | Tue Feb 21 16:50:50 2023 -0800 |
tree | bde56ad63190cf94ee6447c004b2b887628beca6 | |
parent | d51567ca3464a876201b6484d3954082769eb3d9 [diff] |
Fix test failure of CarUserServiceTest#testBackgroundUserList Bug: 270233545 Test: atest CarServiceUnitTest Change-Id: Id8072dfbefdd1cf1b763ec715094b86b94106b37
diff --git a/tests/carservice_unit_test/src/com/android/car/power/ScreenOffHandlerUnitTest.java b/tests/carservice_unit_test/src/com/android/car/power/ScreenOffHandlerUnitTest.java index 24aa879..01899b8 100644 --- a/tests/carservice_unit_test/src/com/android/car/power/ScreenOffHandlerUnitTest.java +++ b/tests/carservice_unit_test/src/com/android/car/power/ScreenOffHandlerUnitTest.java
@@ -51,6 +51,7 @@ import com.android.car.systeminterface.SystemInterface; import com.android.server.testutils.OffsettableClock; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; @@ -89,6 +90,11 @@ setService(); } + @After + public void tearDown() { + CarLocalServices.removeServiceForTest(CarOccupantZoneService.class); + } + @Test public void testParseSetting_valid_returnNonNull() throws Exception { bootComplete();