From 2864475fd77fdc8339551e0ebb3c66f97a34e164 Mon Sep 17 00:00:00 2001 From: Joshua Trask Date: Wed, 2 Mar 2022 11:49:28 -0500 Subject: [PATCH] Ignore some Chooser tests that flake on races. As described in b/222124533, the reliability of these tests can be improved with a timeout, but that's still not a very solid fix. We should just ignore them for now so they stop breaking on the monitor, and meanwhile I'll continue investigating the root cause. Bug: 222124533, 220337209, 220959679, 218218953 Test: disabling tests only Change-Id: I113a1ba4de2176e209339a1cbbe2583cb5fe518c --- .../com/android/internal/app/ChooserActivityTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java index 23ec3ead959fc..76e298b072178 100644 --- a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java +++ b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java @@ -81,7 +81,6 @@ import android.net.Uri; import android.os.UserHandle; import android.provider.DeviceConfig; import android.service.chooser.ChooserTarget; -import android.util.Log; import android.view.View; import androidx.annotation.CallSuper; @@ -2072,7 +2071,7 @@ public class ChooserActivityTest { .check(matches(isDisplayed())); } - @Test + @Test @Ignore("b/222124533") public void testAppTargetLogging() throws InterruptedException { Intent sendIntent = createSendTextIntent(); List resolvedComponentInfos = createResolvedComponentsForTest(2); @@ -2091,6 +2090,10 @@ public class ChooserActivityTest { mActivityRule.launchActivity(Intent.createChooser(sendIntent, null)); waitForIdle(); + // TODO(b/222124533): other test cases use a timeout to make sure that the UI is fully + // populated; without one, this test flakes. Ideally we should address the need for a + // timeout everywhere instead of introducing one to fix this particular test. + assertThat(activity.getAdapter().getCount(), is(2)); onView(withIdFromRuntimeResource("profile_button")).check(doesNotExist()); @@ -2373,7 +2376,7 @@ public class ChooserActivityTest { assertThat(logger.numCalls(), is(6)); } - @Test + @Test @Ignore("b/222124533") public void testSwitchProfileLogging() throws InterruptedException { // enable the work tab feature flag ResolverActivity.ENABLE_TABBED_VIEW = true;