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

Commit 4c44202b authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Reduce broadcast timeouts used during the test runs.

Previously they were getting overriden by the default values.

Bug: 323612062
Test: atest services/tests/mockingservicestests/src/com/android/server/am/BroadcastQueueTest.java
Change-Id: I29a4cb4062534331b4e67cf1eb851cc1b766defd
parent 33334554
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -236,10 +236,6 @@ public class BroadcastQueueTest extends BaseBroadcastQueueTest {
        }).when(mAms).registerUidObserver(any(), anyInt(),
                eq(ActivityManager.PROCESS_STATE_TOP), any());

        mConstants.TIMEOUT = 200;
        mConstants.ALLOW_BG_ACTIVITY_START_TIMEOUT = 0;
        mConstants.PENDING_COLD_START_CHECK_INTERVAL_MILLIS = 500;

        final BroadcastHistory emptyHistory = new BroadcastHistory(mConstants) {
            public void addBroadcastToHistoryLocked(BroadcastRecord original) {
                // Ignored
@@ -259,6 +255,12 @@ public class BroadcastQueueTest extends BaseBroadcastQueueTest {
        mBroadcastQueues[0] = mQueue;

        mQueue.start(mContext.getContentResolver());

        // Set the constants after invoking BroadcastQueue.start() to ensure they don't
        // get overridden by the defaults.
        mConstants.TIMEOUT = 200;
        mConstants.ALLOW_BG_ACTIVITY_START_TIMEOUT = 0;
        mConstants.PENDING_COLD_START_CHECK_INTERVAL_MILLIS = 500;
    }

    @After