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

Commit 81812919 authored by Malcolm Chen's avatar Malcolm Chen
Browse files

Fix flaky test PhoneSwitcherTest#testHigherPriorityDefault

Root cause is, handler thread and main test thread are touching
a variable without synchronization. Solution is to pause test
thread a bit.

Bug: 118381914
Test: rounds of PhoneSwitcherTest re-run
Change-Id: I2608e692f719b2ecf0ef9aa4f3875ce1aef717bd
Merged-In: I2608e692f719b2ecf0ef9aa4f3875ce1aef717bd
parent 0f49abe0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ public class PhoneSwitcherTest extends TelephonyTest {
        initialize(numPhones, maxActivePhones);

        addInternetNetworkRequest(null, 50);
        waitABit();

        setSlotIndexToSubId(0, 0);
        setSlotIndexToSubId(1, 1);
        setDefaultDataSubId(0);