Resolve race condition between @Before conditions
Bug: 159671700 Change-Id: I5c96c32c171b7b539ce0ea799cf45955c2bee670
This commit is contained in:
parent
35879a3fdb
commit
9fa2d8812a
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue