Skip all tests after a test times out

That test can continue running in the "Time-limited test" thread,
and we don't know whether it makes sense to wait for its completion.

Flag: EXEMPT test fix
Fixes: 405849365
Test: TAPL tests; pre/postsubmit
Change-Id: I3bdd6e5b07f109124f938766b7f2e427d2e39b01
This commit is contained in:
Vadim Tryshev committed 2025-05-15 13:44:40 -07:00
1 parent aa0b9183da
commit 3743ca97c7
4 files changed
+17 -23

No files matched your search

@@ -23,6 +23,7 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS;
import static com.android.launcher3.tapl.TestHelpers.getHomeIntentInPackage;
import static com.android.launcher3.tapl.TestHelpers.getLauncherInMyProcess;
import static com.android.launcher3.ui.TaplTestsLauncher3Test.getAppPackageName;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.rule.ShellCommandRule.disableHeadsUpNotification;
import static com.android.launcher3.util.rule.ShellCommandRule.getLauncherCommand;
@@ -30,7 +31,6 @@ import static com.android.launcher3.util.ui.AbstractLauncherUiTest.DEFAULT_BROAD
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.resolveSystemApp;
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.startAppFast;
import static com.android.launcher3.util.ui.AbstractLauncherUiTest.startTestActivity;
import static com.android.launcher3.ui.TaplTestsLauncher3Test.getAppPackageName;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -58,9 +58,9 @@ import com.android.launcher3.testcomponent.TestCommandReceiver;
import com.android.launcher3.util.TestUtil;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.FailureWatcher;
import com.android.launcher3.util.rule.MutualExclusionRule;
import com.android.launcher3.util.rule.SamplerRule;
import com.android.launcher3.util.rule.ScreenRecordRule;
import com.android.launcher3.util.rule.SkipAfterTimeOutRule;
import com.android.launcher3.util.rule.TestIsolationRule;
import com.android.launcher3.util.rule.TestStabilityRule;
import com.android.launcher3.util.rule.ViewCaptureRule;
@@ -113,7 +113,7 @@ public class FallbackRecentsTest {
public ExtendedLongPressTimeoutRule mLongPressTimeoutRule = new ExtendedLongPressTimeoutRule();
@Rule(order = -1000) // This should be the outermost rule
public MutualExclusionRule mMutualExclusionRule = new MutualExclusionRule();
public SkipAfterTimeOutRule mSkipAfterTimeOutRule = new SkipAfterTimeOutRule();
public FallbackRecentsTest() throws RemoteException {
Instrumentation instrumentation = getInstrumentation();