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

Commit bf6d630f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix RescuePartyTest" into main

parents ea3abee0 00e50067
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -239,6 +239,9 @@ public class RescuePartyTest {

    @Test
    public void testBootLoopDetectionWithExecutionForAllRescueLevels() {
        // this is old test where the flag needs to be disabled
        mSetFlagsRule.disableFlags(Flags.FLAG_RECOVERABILITY_DETECTION);

        RescueParty.onSettingsProviderPublished(mMockContext);
        verify(() -> DeviceConfig.setMonitorCallback(eq(mMockContentResolver),
                any(Executor.class),
@@ -449,6 +452,9 @@ public class RescuePartyTest {

    @Test
    public void testNonPersistentAppCrashDetectionWithScopedResets() {
        // this is old test where the flag needs to be disabled
        mSetFlagsRule.disableFlags(Flags.FLAG_RECOVERABILITY_DETECTION);

        RescueParty.onSettingsProviderPublished(mMockContext);
        verify(() -> DeviceConfig.setMonitorCallback(eq(mMockContentResolver),
                any(Executor.class),
@@ -506,6 +512,9 @@ public class RescuePartyTest {

    @Test
    public void testNonDeviceConfigSettingsOnlyResetOncePerLevel() {
        // this is old test where the flag needs to be disabled
        mSetFlagsRule.disableFlags(Flags.FLAG_RECOVERABILITY_DETECTION);

        RescueParty.onSettingsProviderPublished(mMockContext);
        verify(() -> DeviceConfig.setMonitorCallback(eq(mMockContentResolver),
                any(Executor.class),
@@ -879,6 +888,9 @@ public class RescuePartyTest {

    @Test
    public void testBootLoopLevels() {
        // this is old test where the flag needs to be disabled
        mSetFlagsRule.disableFlags(Flags.FLAG_RECOVERABILITY_DETECTION);

        RescuePartyObserver observer = RescuePartyObserver.getInstance(mMockContext);

        assertEquals(observer.onBootLoop(0), PackageHealthObserverImpact.USER_IMPACT_LEVEL_0);