Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 333ab7cd authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Check user existence in UserManagerTest.runThenWaitForUserRemoval.

Currently runThenWaitForUserRemoval helper method waits for
ACTION_USER_REMOVED broadcast after calling its runnable parameter,
without checking whether the user exists in the first place.

This was causing problems on the tearDown stage, like when profiles
were removed automatically when their parent user is removed.
They were staying in mUsersToRemove collection, but since they didn't
exist on the tearDown stage, waiting for their ACTION_USER_REMOVED
broadcast and failing when it was not received was wrong.

This CL adds a control to skip waiting for the broadcast if the user
is already removed.

Bug: 261468057
Test: atest UserManagerTest#testRemoveUserWhenPossible_withProfiles
Change-Id: I53e4e392eb6f65012c15f0bce007fb19ba225f2d
parent e9335b8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment