From 34a78c50b04e282a2220ed84713b29881fd8765a Mon Sep 17 00:00:00 2001 From: Andrei Onea Date: Tue, 29 Sep 2020 17:42:32 +0100 Subject: [PATCH] Fix compat change CTS test flakiness Cleanup overrides in the PlatformCompatCommandNotInstalledTest test. Test: atest PlatformCompatCommandNotInstalledTest Test: adb shell dumpsys platform_compat | grep override # is empty Bug: 169235095 Change-Id: Ibd9f2801e8b4c571dca49f0682a8bc3b17ffd545 --- .../tests/gating/PlatformCompatCommandNotInstalledTest.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/PlatformCompatGating/src/com/android/tests/gating/PlatformCompatCommandNotInstalledTest.kt b/tests/PlatformCompatGating/src/com/android/tests/gating/PlatformCompatCommandNotInstalledTest.kt index 0f62c4fa66a38..e9227e94da988 100644 --- a/tests/PlatformCompatGating/src/com/android/tests/gating/PlatformCompatCommandNotInstalledTest.kt +++ b/tests/PlatformCompatGating/src/com/android/tests/gating/PlatformCompatCommandNotInstalledTest.kt @@ -107,7 +107,10 @@ class PlatformCompatCommandNotInstalledTest { fun ParcelFileDescriptor.text() = FileReader(fileDescriptor).readText() @After - fun resetIdentity() = uiAutomation.dropShellPermissionIdentity() + fun resetChangeIdAndIdentity() { + command("am compat reset $TEST_CHANGE_ID $TEST_PKG") + uiAutomation.dropShellPermissionIdentity() + } @Test fun execute() {