Improve test isolation in AbstractLauncherUiTests
- Removing suspicious duplicate uses of AbstractLauncherUiTest.initialize to prevent unnecesary launcher restarts - Adding UiDevice#pressHome to AbstractLauncherUiTests.verifyLauncherState to ensure the next test starts with a known clean state Flag: EXEMPT test fix Fixes: 372956489 Test: AbstractLauncherUiTest Change-Id: Id68ece4ab195a4f6c47aa401eb50a91b8ff70e10
This commit is contained in:
1 parent
247bc0461a
commit
07669e9575
4 files changed
+1
-10
No files matched your search
@@ -415,6 +415,7 @@ public abstract class AbstractLauncherUiTest<LAUNCHER_TYPE extends Launcher> {
|
||||
public void verifyLauncherState() {
|
||||
try {
|
||||
// Limits UI tests affecting tests running after them.
|
||||
mDevice.pressHome();
|
||||
mLauncher.waitForLauncherInitialized();
|
||||
if (mLauncherPid != 0) {
|
||||
assertEquals("Launcher crashed, pid mismatch:",
|
||||
|
||||
Reference in new issue
Block a user