From b7a4a91bbf25f9c1a2807a634b76eb1550e9bdba Mon Sep 17 00:00:00 2001 From: Yanting Yang Date: Thu, 20 Jan 2022 18:53:14 +0800 Subject: [PATCH] Fix broken tests of ApplicationsStateRoboTest Fixes: 215306267 Test: robotests Change-Id: Ibf4e3a52a706a5532d4571a2b388ac4425f607bb --- .../applications/ApplicationsStateRoboTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java index 1edb7d18bc881..10ccd22eca83c 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/applications/ApplicationsStateRoboTest.java @@ -64,7 +64,6 @@ import com.android.settingslib.testutils.shadow.ShadowUserManager; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; @@ -436,7 +435,6 @@ public class ApplicationsStateRoboTest { } @Test - @Ignore public void noAppRemoved_noWorkprofile_doResumeIfNeededLocked_shouldNotClearEntries() throws RemoteException { // scenario: only owner user @@ -630,7 +628,6 @@ public class ApplicationsStateRoboTest { } @Test - @Ignore public void noAppRemoved_workprofileExists_doResumeIfNeededLocked_shouldNotClearEntries() throws RemoteException { if (!MU_ENABLED) { @@ -711,11 +708,11 @@ public class ApplicationsStateRoboTest { throws RemoteException { if (ownerApps != null) { - when(mApplicationsState.mIpm.getInstalledApplications(anyInt(), eq(0))) + when(mApplicationsState.mIpm.getInstalledApplications(anyLong(), eq(0))) .thenReturn(new ParceledListSlice<>(ownerApps)); } if (profileApps != null) { - when(mApplicationsState.mIpm.getInstalledApplications(anyInt(), eq(PROFILE_USERID))) + when(mApplicationsState.mIpm.getInstalledApplications(anyLong(), eq(PROFILE_USERID))) .thenReturn(new ParceledListSlice<>(profileApps)); } final InterestingConfigChanges configChanges = mock(InterestingConfigChanges.class);