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

Commit 5d224f8c authored by Ahmad Khalil's avatar Ahmad Khalil Committed by Lais Andrade
Browse files

Fix flaky test VibrationThreadTest#vibrate_multipleVibrations_withCancel

We're removing the callback verification since the test's focus is not on verifying the onComplete callback's timing after a vibration cancellation. Instead, we aim to confirm that the final vibration, triggered post-cancellation, actually executes as expected.

Fix: 368359597
Bug: 349156580
Test: atest --rerun-until-failure 1000 com.android.server.vibrator.VibrationThreadTest#vibrate_multipleVibrations_withCancel
Flag: TEST_ONLY
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e52f0538606a48ef71319487344007cf5817e461)
Merged-In: I80dd468c9f31a1676e38b24766388934a6f03fa7
Change-Id: I80dd468c9f31a1676e38b24766388934a6f03fa7
parent f189469f
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1746,10 +1746,6 @@ public class VibrationThreadTest {
        assertTrue("Tested duration=" + duration4, duration4 < 2000);

        // Effect5: played normally after effect4, which may or may not have played.

        verify(mControllerCallbacks).onComplete(eq(VIBRATOR_ID), eq(vibrationId5));
        verifyCallbacksTriggered(vibrationId5, Vibration.Status.FINISHED);

        assertEquals(Arrays.asList(expectedPrebaked(VibrationEffect.EFFECT_CLICK)),
                fakeVibrator.getEffectSegments(vibrationId5));
    }