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

Commit fb207fad authored by Marvin Ramin's avatar Marvin Ramin
Browse files

Fix flaky test

Fix flaky unit test HdmiControlServiceTest#getCecVersion_default

Bug: 171956714
Test: atest HdmiControlServiceTest (multiple times)
Change-Id: Iba6ad8284abfbd9340a893ed5625bbe4dc2598e0
parent d03da613
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -382,9 +382,13 @@ public class HdmiControlServiceTest {
        assertThat(callback2.mVolumeControlEnabled).isTrue();
    }


    @Test
    public void getCecVersion_default() {
        // Set the Settings value to "null" to emulate it being empty and force the default value.
        Settings.Global.putString(mContextSpy.getContentResolver(),
                Settings.Global.HDMI_CEC_VERSION,
                null);
        mHdmiControlService.setControlEnabled(true);
        assertThat(mHdmiControlService.getCecVersion()).isEqualTo(Constants.VERSION_1_4);
    }