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

Commit 6120c3a2 authored by chen xu's avatar chen xu Committed by Brad Ebinger
Browse files

fix flaky test for DcTrackerTest.testUserDisableRoaming

flaky issue is likely due to not enough wait time.

Bug: 124864866
Test: atest DcTrackerTest#testUserDisableRoaming
Merged-In: I14d50ed7e95f99fffea50270aff1847187adb07a
Change-Id: I14d50ed7e95f99fffea50270aff1847187adb07a
parent de2e9e39
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -735,14 +735,19 @@ public class DcTrackerTest extends TelephonyTest {
                new String[]{PhoneConstants.APN_TYPE_DEFAULT, PhoneConstants.APN_TYPE_MMS});

        mDct.enableApn(ApnSetting.TYPE_IMS, DcTracker.REQUEST_TYPE_NORMAL, null);
        waitForHandlerAction(mDct, 1000);
        mDct.enableApn(ApnSetting.TYPE_DEFAULT, DcTracker.REQUEST_TYPE_NORMAL, null);
        waitForHandlerAction(mDct, 1000);

        logd("Sending EVENT_RECORDS_LOADED");
        mDct.sendMessage(mDct.obtainMessage(DctConstants.EVENT_RECORDS_LOADED, null));
        waitForMs(200);
        waitForHandlerAction(mDct, 1000);

        logd("Sending EVENT_DATA_CONNECTION_ATTACHED");
        mDct.sendMessage(mDct.obtainMessage(DctConstants.EVENT_DATA_CONNECTION_ATTACHED, null));
        waitForHandlerAction(mDct, 1000);
        logd("Handling EVENT_DATA_CONNECTION_ATTACHED complete");
        // dataconnection is on a different handler
        waitForMs(200);

        ArgumentCaptor<DataProfile> dpCaptor = ArgumentCaptor.forClass(DataProfile.class);