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

Commit 807ffbdc authored by Sarah Chin's avatar Sarah Chin
Browse files

Fix hanging telephony tests

atest FrameworksTelephonyTests would hang because cleanup wasn't handled
properly by some tests. Make sure all classes that extend TelephonyTest
also call super.tearDown() in their @After method.

Test: atest FrameworksTelephonyTests (results are printed)
Bug: 266748137
Change-Id: I26cb2ec15abd2ef392d39be5a03759b36ce293f2
parent 27a10e2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -57,8 +57,9 @@ public class InboundSmsTrackerTest extends TelephonyTest {
    }

    @After
    public void tearDown() {
    public void tearDown() throws Exception {
        mInboundSmsTracker = null;
        super.tearDown();
    }

    public static MatrixCursor createFakeCursor() {
+6 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.os.UserManager;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -44,6 +45,11 @@ public class TelephonyAdminReceiverTest extends TelephonyTest {
        mTelephonyAdminReceiver = new TelephonyAdminReceiver(mContext, mPhone);
    }

    @After
    public void tearDown() throws Exception {
        super.tearDown();
    }

    @Test
    public void test_nullUserManager() {
        mUserManager = null;