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

Commit fbfe6d97 authored by Neal Nguyen's avatar Neal Nguyen
Browse files

Fixing DownloadManager Test app.

The skip notification version of waitForDownloadOrTimeout wasn't actually
skipping the DownloadManager notification check.

Change-Id: Iee42d9c67e63c9dc45ef5aad8ada7d34c31eeb60
parent 9f443fb6
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -491,9 +491,10 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase {
     *
     * @param id The download id to query on (wait for)
     */
    private void waitForDownloadOrTimeout_skipNotification(long id) throws TimeoutException,
    protected void waitForDownloadOrTimeout_skipNotification(long id) throws TimeoutException,
            InterruptedException {
        waitForDownloadOrTimeout(id, WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
        doWaitForDownloadsOrTimeout(new Query().setFilterById(id),
                WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
    }

    /**
@@ -505,8 +506,7 @@ public class DownloadManagerBaseTest extends InstrumentationTestCase {
     */
    protected void waitForDownloadOrTimeout(long id) throws TimeoutException,
            InterruptedException {
        waitForDownloadOrTimeout_skipNotification(id);
        waitForReceiverNotifications(1);
        waitForDownloadOrTimeout(id, WAIT_FOR_DOWNLOAD_POLL_TIME, MAX_WAIT_FOR_DOWNLOAD_TIME);
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ public class DownloadManagerTestApp extends DownloadManagerBaseTest {

            // Wait until the download finishes; don't wait for a notification b/c
            // the download may well have been completed before the last reboot.
            waitForDownloadOrTimeout(dlRequest);
            waitForDownloadOrTimeout_skipNotification(dlRequest);

            Log.i(LOG_TAG, "Verifying download information...");
            // Verify specific info about the file (size, name, etc)...