diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-01-29 14:48:46 -0800 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-01-29 15:36:51 -0800 |
commit | 58eee87b70862a7ced85eabc3c225fad24664065 (patch) | |
tree | 306bd82ba9eab04c2e2a4936a406651c08675a7b /tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java | |
parent | 38648831a92295e9a11831e19e5a9dab4cbd939e (diff) | |
download | android_packages_providers_DownloadProvider-58eee87b70862a7ced85eabc3c225fad24664065.tar.gz android_packages_providers_DownloadProvider-58eee87b70862a7ced85eabc3c225fad24664065.tar.bz2 android_packages_providers_DownloadProvider-58eee87b70862a7ced85eabc3c225fad24664065.zip |
Tests for max retries/redirects, ETag switches.
Verify that servers responding with many retries or redirects result
in failed download, instead of spinning out of control. Test to
verify that changed ETag results in download failing.
Also fix handling of HTTP 301 to update Uri in database.
Change-Id: Iff2948d79961a245b7900117d107edaa356618c9
Diffstat (limited to 'tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java')
-rw-r--r-- | tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java b/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java index 48eb0b47..acfd4736 100644 --- a/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java +++ b/tests/src/com/android/providers/downloads/AbstractDownloadProviderFunctionalTest.java @@ -52,11 +52,9 @@ public abstract class AbstractDownloadProviderFunctionalTest extends protected static final String LOG_TAG = "DownloadProviderFunctionalTest"; private static final String PROVIDER_AUTHORITY = "downloads"; protected static final long RETRY_DELAY_MILLIS = 61 * 1000; - protected static final String FILE_CONTENT = "hello world hello world hello world hello world"; - protected static final int HTTP_OK = 200; - protected static final int HTTP_PARTIAL_CONTENT = 206; - protected static final int HTTP_NOT_FOUND = 404; - protected static final int HTTP_SERVICE_UNAVAILABLE = 503; + + protected static final String + FILE_CONTENT = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; protected MockWebServer mServer; protected MockContentResolverWithNotify mResolver; |