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

Commit 06e18c71 authored by Rongxuan Liu's avatar Rongxuan Liu
Browse files

le_audio: Remove invalid tests for stopping service first

This is a follow-up CL from
https://android-review.git.corp.google.com/c/platform/packages/modules/Bluetooth/+/3085308/comments/e6c9fd25_0d21556f

Because the testing sequence doesn't match normal lifecycle of a bluetooth profile.
So the review comment suggest to remove the invalid tests, instead of
introducing changes in LeAudioService.
Those 2 test cases are causing failure when advancing leaudioUseAudioModeListener flag.

Tag: #Bug
Bug: 329172203
Flag: Exempt, test file only change
Test: atest LeAudioServiceTest LeAudioBroadcastServiceTest
Change-Id: I05307cbc62953317462c085efdf2626cd8d3df4b
parent ea5f03ed
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -266,14 +266,6 @@ public class LeAudioBroadcastServiceTest {
        Assert.assertEquals(mService, LeAudioService.getLeAudioService());
    }

    @Test
    public void testStopLeAudioService() {
        Assert.assertEquals(mService, LeAudioService.getLeAudioService());

        InstrumentationRegistry.getInstrumentation().runOnMainSync(mService::stop);
        InstrumentationRegistry.getInstrumentation().runOnMainSync(mService::start);
    }

    void verifyBroadcastStarted(int broadcastId, BluetoothLeBroadcastSettings settings) {
        mService.createBroadcast(settings);

+0 −13
Original line number Diff line number Diff line
@@ -381,19 +381,6 @@ public class LeAudioServiceTest {
        InstrumentationRegistry.getInstrumentation().runOnMainSync(mService::stop);
    }

    /** Test if stop during init is ok. */
    @Test
    public void testStopStartStopService() throws Exception {
        InstrumentationRegistry.getInstrumentation()
                .runOnMainSync(
                        () -> {
                            mService.stop();
                            mService.start();
                            mService.stop();
                            mService.start();
                        });
    }

    /** Test get/set priority for BluetoothDevice */
    @Test
    public void testGetSetPriority() {