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

Skip to content
Commit 1fc5c892 authored by Lais Andrade's avatar Lais Andrade
Browse files

Fix flaky VibratorCallbackSchedulerTest

Use TestCounter to wait on scheduled callbacks with a timeout.

The VibratorCallbackScheduler destructor joins on the scheduler
thread to wait for the main loop to finish, but the conditional variable
is waiting indefinitely without a predicate, which can cause it
sometimes to miss the notify call from the destructor and get stuck.

Adding a predicate condition fixes the VibratorCallbackSchedulerTest
flakiness for the timeout "No test results." failures.

Bug: 335951228
Bug: 335577082
Change-Id: If1af34f70de9fa5175aa38ebfb22f5b6d9112272
Merged-In: Id9501c10fe5209003d9b74b0f39f2bcf87de05c2
Merged-In: Ib519c3e91608c7373b2999fc596dab3413226a1e
Test: atest --rerun-until-failure 1000 VibratorCallbackSchedulerTest
parent 951e7350
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment