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

Commit cdb14a15 authored by dakinola's avatar dakinola Committed by Daniel Akinola
Browse files

Update assertion for ContentRecordingController test

Added this assertion in ag/24265583, assuming that updateRecording could have only been called once, but it can be called previously in the test setup when the DisplayContent is created (if a race conidition is satified, ergo causing flakes). Updating assertion accordingly to stop failures when updateRecording is called more than once.

Bug: 295887403
Test: atest WmTests:ContentRecordingControllerTests#testSetContentRecordingSessionLocked_updateSession_noLongerWaiting_accepted
Change-Id: Ife46df61c4796da395216021eec75cec44a75f75
parent a7c60486
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ public class ContentRecordingControllerTests extends WindowTestsBase {
        controller.setContentRecordingSessionLocked(mWaitingDisplaySession, mWm);
        verify(mVirtualDisplayContent, atLeastOnce()).setContentRecordingSession(
                mWaitingDisplaySession);
        verify(mVirtualDisplayContent).updateRecording();
        verify(mVirtualDisplayContent, atLeastOnce()).updateRecording();

        // WHEN updating the session on the same display, so no longer waiting to record.
        ContentRecordingSession sessionUpdate = ContentRecordingSession.createTaskSession(