Test tweaks for the memory activity recreation test
Speeding up switching navigation mode by switching from latch
(which is not fired) to polling. I'll figure out later why the latch
doesn't work.
Bug: 139137636
Change-Id: I28a9b2b9a3882919fd2a3280b9804afe1b44a46e
diff --git a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
index cd94704..4ac815e 100644
--- a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
+++ b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
@@ -49,7 +49,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
/**
* Test rule that allows executing a test with Quickstep on and then Quickstep off.
@@ -186,11 +185,18 @@
};
targetContext.getMainExecutor().execute(() ->
SYS_UI_NAVIGATION_MODE.addModeChangeListener(listener));
- latch.await(60, TimeUnit.SECONDS);
+ // b/139137636
+// latch.await(60, TimeUnit.SECONDS);
targetContext.getMainExecutor().execute(() ->
SYS_UI_NAVIGATION_MODE.removeModeChangeListener(listener));
- assertTrue(launcher, "Navigation mode didn't change to " + expectedMode,
- currentSysUiNavigationMode() == expectedMode, description);
+
+ Wait.atMost(() -> "Navigation mode didn't change to " + expectedMode,
+ () -> currentSysUiNavigationMode() == expectedMode, 60000 /* b/148422894 */,
+ launcher);
+ // b/139137636
+// assertTrue(launcher, "Navigation mode didn't change to " + expectedMode,
+// currentSysUiNavigationMode() == expectedMode, description);
+
}
Wait.atMost("Couldn't switch to " + overlayPackage,