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

Commit e867c5af authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "tests: Fix handling exceptions during the setup phase"

parents cb9432dd ea8c9ff2
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -126,6 +126,10 @@ public class BassClientServiceTest {


    @After
    @After
    public void tearDown() throws Exception {
    public void tearDown() throws Exception {
        if (mBassClientService == null) {
            return;
        }

        TestUtils.stopService(mServiceRule, BassClientService.class);
        TestUtils.stopService(mServiceRule, BassClientService.class);
        mBassClientService = BassClientService.getBassClientService();
        mBassClientService = BassClientService.getBassClientService();
        assertThat(mBassClientService).isNull();
        assertThat(mBassClientService).isNull();
+8 −0
Original line number Original line Diff line number Diff line
@@ -132,6 +132,14 @@ public class CsipSetCoordinatorServiceTest {


    @After
    @After
    public void tearDown() throws Exception {
    public void tearDown() throws Exception {
        if (mService == null) {
            return;
        }

        if (Looper.myLooper() == null) {
            return;
        }

        stopService();
        stopService();
        mTargetContext.unregisterReceiver(mCsipSetCoordinatorIntentReceiver);
        mTargetContext.unregisterReceiver(mCsipSetCoordinatorIntentReceiver);
        TestUtils.clearAdapterService(mAdapterService);
        TestUtils.clearAdapterService(mAdapterService);
+4 −0
Original line number Original line Diff line number Diff line
@@ -170,6 +170,10 @@ public class HapClientTest {


    @After
    @After
    public void tearDown() throws Exception {
    public void tearDown() throws Exception {
        if (mService == null) {
            return;
        }

        mService.mCallbacks.unregister(mCallback);
        mService.mCallbacks.unregister(mCallback);


        stopService();
        stopService();
+4 −0
Original line number Original line Diff line number Diff line
@@ -193,6 +193,10 @@ public class LeAudioBroadcastServiceTest {


    @After
    @After
    public void tearDown() throws Exception {
    public void tearDown() throws Exception {
        if (mService == null) {
            return;
        }

        stopService();
        stopService();
        mTargetContext.unregisterReceiver(mLeAudioIntentReceiver);
        mTargetContext.unregisterReceiver(mLeAudioIntentReceiver);
        TestUtils.clearAdapterService(mAdapterService);
        TestUtils.clearAdapterService(mAdapterService);
+4 −0
Original line number Original line Diff line number Diff line
@@ -215,6 +215,10 @@ public class LeAudioServiceTest {


    @After
    @After
    public void tearDown() throws Exception {
    public void tearDown() throws Exception {
        if ((mService == null) || (mAdapter == null)) {
            return;
        }

        mBondedDevices.clear();
        mBondedDevices.clear();
        mGroupIntentQueue.clear();
        mGroupIntentQueue.clear();
        stopService();
        stopService();
Loading