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

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

Merge "le_audio: Fix broadcast test flakiness by waiting for scheduled callbacks" into main

parents be05f751 b4d86ee0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -334,6 +334,8 @@ public class LeAudioBroadcastServiceTest {

        // Check if metadata is requested when the broadcast starts to stream
        verify(mLeAudioBroadcasterNativeInterface, times(1)).getBroadcastMetadata(eq(broadcastId));
        TestUtils.waitForLooperToFinishScheduledTask(mService.getMainLooper());

        Assert.assertFalse(mOnBroadcastStartFailedCalled);
        Assert.assertTrue(mOnBroadcastStartedCalled);
    }
@@ -476,6 +478,8 @@ public class LeAudioBroadcastServiceTest {

        // Verify if broadcast is auto-started on start
        verify(mLeAudioBroadcasterNativeInterface, times(1)).startBroadcast(eq(broadcastId));
        TestUtils.waitForLooperToFinishScheduledTask(mService.getMainLooper());

        Assert.assertTrue(mOnBroadcastStartedCalled);

        // Notify initial paused state