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

Commit 7c57573e authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Increase test timeout for waiting DeviceConfig

With adding log to check whether the callback is called.

Bug: 319552427
Test: SplashScreenExceptionListTest#packageFromDeviceConfigIgnored
Change-Id: I9a201a3ebb04efa508318dc7c5f46634cb0d2485
parent f7a526b9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.os.HandlerExecutor;
import android.os.Looper;
import android.platform.test.annotations.Presubmit;
import android.provider.DeviceConfig;
import android.util.Log;

import androidx.test.filters.MediumTest;

@@ -147,6 +148,8 @@ public class SplashScreenExceptionListTest {
    private void setExceptionListAndWaitForCallback(String commaSeparatedList) {
        CountDownLatch latch = new CountDownLatch(1);
        mOnUpdateDeviceConfig = rawList -> {
            Log.i(getClass().getSimpleName(), "updateDeviceConfig expected="
                    + commaSeparatedList + " actual=" + rawList);
            if (commaSeparatedList.equals(rawList)) {
                latch.countDown();
            }
@@ -155,7 +158,7 @@ public class SplashScreenExceptionListTest {
                KEY_SPLASH_SCREEN_EXCEPTION_LIST, commaSeparatedList, false);
        try {
            assertTrue("Timed out waiting for DeviceConfig to be updated.",
                    latch.await(1, TimeUnit.SECONDS));
                    latch.await(5, TimeUnit.SECONDS));
        } catch (InterruptedException e) {
            Assert.fail(e.getMessage());
        }