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

Commit fb7d3be5 authored by Yasin Kilicdere's avatar Yasin Kilicdere
Browse files

Make testRemoveUserByHandle_ThrowsException fail faster.

Currently UserManagerTest#testRemoveUserByHandle_ThrowsException uses
the helper 'removeUser' method which registers for a
BlockingBroadcastReceiver and since we're not expecting a broadcast
it only fails after the timeout. This CL removes that unnecessary step
and decreases this test method's duration from 3 minutes to 1 ms.

Test: atest UserManagerTest#testRemoveUserByHandle_ThrowsException
Change-Id: I9302054cb53b1e0027bb2bcb9da74d98f390f2ed
parent bef72a40
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ public final class UserManagerTest {
    @MediumTest
    @Test
    public void testRemoveUserByHandle_ThrowsException() {
        assertThrows(IllegalArgumentException.class, () -> removeUser(null));
        assertThrows(IllegalArgumentException.class, () -> mUserManager.removeUser(null));
    }

    @MediumTest