Merge "Resolve race condition between @Before conditions" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot
2020-09-30 18:39:58 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 1 deletions
@@ -279,6 +279,8 @@ public abstract class AbstractLauncherUiTest {
if (userManager != null) {
for (UserHandle userHandle : userManager.getUserProfiles()) {
if (!userHandle.isSystem()) {
Log.d(TestProtocol.WORK_PROFILE_REMOVED,
"removing user " + userHandle.getIdentifier());
mDevice.executeShellCommand("pm remove-user " + userHandle.getIdentifier());
}
}
@@ -55,7 +55,9 @@ public class WorkTabTest extends AbstractLauncherUiTest {
private static final int WORK_PAGE = AllAppsContainerView.AdapterHolder.WORK;
@Before
public void createWorkProfile() throws Exception {
@Override
public void setUp() throws Exception {
super.setUp();
String output =
mDevice.executeShellCommand(
"pm create-user --profileOf 0 --managed TestProfile");