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

Commit e52f0538 authored by Ahmad Khalil's avatar Ahmad Khalil
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.

Bug: 349156580
Test: atest --rerun-until-failure 1000 com.android.server.vibrator.VibrationThreadTest#vibrate_multipleVibrations_withCancel
Flag: TEST_ONLY
Change-Id: I80dd468c9f31a1676e38b24766388934a6f03fa7
parent c1a45cb5
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));
    }