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

Commit d3990130 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Disable caches for perf tests

Bug: 140788621
Test: atest PackageManagerPerfTest
Change-Id: Idba8ea4c53ceacd9e07a06717c44d5411aef45d8
parent 23c81a15
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;

import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -58,6 +59,12 @@ public class PackageManagerPerfTest {
        final Context context = InstrumentationRegistry.getInstrumentation().getContext();
    }

    @Before
    public void setup() {
        PackageManager.disableApplicationInfoCache();
        PackageManager.disablePackageInfoCache();
    }

    @Test
    @DisableCompatChanges(PackageManager.FILTER_APPLICATION_QUERY)
    public void testCheckPermissionExists() {