From 5218d33d57990c3e3549c58bd3f0ac244dfc3d59 Mon Sep 17 00:00:00 2001 From: Vasu Nori Date: Thu, 16 Dec 2010 18:31:23 -0800 Subject: bug:3286430 set quota on downloads data dir make sure the doanloads data dir size is limited by some quote - 100MB default and 200MB for SR. bug:3286430 tests are in Change-Id: I688f7e058511089bec7fa21e972e23780604d98a Change-Id: Iba7fab9fa91ea018f35e1c3ef5ec0e6b03cba650 --- .../android/providers/downloads/DownloadManagerFunctionalTest.java | 2 +- .../src/com/android/providers/downloads/PublicApiFunctionalTest.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'tests/src/com/android/providers') diff --git a/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java b/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java index d7f47870..c3ac8904 100644 --- a/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java +++ b/tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java @@ -65,7 +65,7 @@ public class DownloadManagerFunctionalTest extends AbstractDownloadManagerFuncti Integer.toString(Downloads.Impl.DESTINATION_CACHE_PARTITION)); runUntilStatus(downloadUri, Downloads.Impl.STATUS_SUCCESS); assertEquals(FILE_CONTENT, getDownloadContents(downloadUri)); - assertStartsWith(Helpers.getDownloadsDataDirectory(getContext()).getAbsolutePath(), + assertStartsWith(getContext().getCacheDir().getAbsolutePath(), getDownloadFilename(downloadUri)); } diff --git a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java index 96fbaabd..64c19530 100644 --- a/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java +++ b/tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java @@ -25,7 +25,6 @@ import android.net.Uri; import android.os.Environment; import android.provider.Downloads; import android.test.suitebuilder.annotation.LargeTest; -import android.test.suitebuilder.annotation.Suppress; import tests.http.MockResponse; import tests.http.RecordedRequest; @@ -386,10 +385,6 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest { runSimpleFailureTest(DownloadManager.ERROR_HTTP_DATA_ERROR); } - /** - * un-suppress this test once the bug 3286430 is fixed - */ - @Suppress public void testInsufficientSpace() throws Exception { // this would be better done by stubbing the system API to check available space, but in the // meantime, just use an absurdly large header value -- cgit v1.2.3