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

Commit 00e50067 authored by Harshit Mahajan's avatar Harshit Mahajan
Browse files

Fix RescuePartyTest

Disable flags in old test, these could be removed during flag cleanup

Bug: 333720513
Test: atest RescuePartyTest
Change-Id: If659c702e3348c1c814f922f55d97776b99f2ff8
parent 86b9f644
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);