Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment