History log of /packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
7ce206b2108714035eeed29c1dc268a3f1ccf359 22-Feb-2013 Jeff Sharkey <jsharkey@android.com> Test to verify extremely large downloads.

Streams a 3GB file to verify that it downloads correctly, using new
MockWebServer streaming API.

Bug: 8209169
Change-Id: Ic36271bfef3176e1ccea2b40edc7abb1044222f1
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
58eee87b70862a7ced85eabc3c225fad24664065 29-Jan-2013 Jeff Sharkey <jsharkey@android.com> 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
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
0de55602ec6d350548248feddc68c91b29326eff 24-Dec-2012 Jeff Sharkey <jsharkey@android.com> Simplify download flow control, handle redirects.

Move redirection handling into a single loop, and handle each HTTP
response code inline to make flow control easier to reason about.

Fix race condition in tests by waiting for first status update.

Bug: 7887226
Change-Id: Id4bfd182941baad4cd0bb702376c4beeb7275bb2
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
8ac10e0e0667a4fe35191deebb5fa9786bf4226c 04-Jan-2013 Jeff Sharkey <jsharkey@android.com> Clean up DownloadManager threading tests.

Change runUntilStatus() methods to polling with timeout instead of
requiring internal knowledge about threading.

Fix notification tests, and move opening of InputStream until after
handling headers to avoid FNFE. Always reset facade to defaults
before each test.

Change-Id: I6b2d6cfc4e685d2090c1133b1b2e89ae12760f8b
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
ae6856b0fca5215f45619dd031a7e7beae7bd8cc 29-Mar-2012 Jeff Sharkey <jsharkey@android.com> Migrate to shared MockWebServer.

Bug: 4726601
Change-Id: Ibe537bd5c2a092dbf974360cd454751881f7f4ea
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
5d217003acf21aea852975af0dff3b398cea6768 07-Dec-2010 Vasu Nori <vnori@google.com> fix broken DownloadManager tests

one big change in this CL is addition of a new feature to MockWebServer.
It can now play a long response to the Downloading thread to keep it busy
while something - such as cancel/remove - can be done to that Download Request.

Also, added changes to FakeSystemFacade to start threads in normal fashion
instead of queuing them up and later running just their run() methods.

the following tests should work now
packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DownloadManagerFunctionalTest.java
PublicApiFunctionalTest.java
ThreadingTest.java
PublicApiAccessTest.java
DownloadProviderPermissionsTest.java

the following are flaky. they need to be split up into smaller tests.
frameworks/base/core/tests/coretests/src/android/app/
DownloadManagerIntegrationTest.java
DownloadManagerStressTest.java

Change-Id: Ia0b11963f92e8f8365f701761dcbce467be3ee9b
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
a1448628237471a7a2aeb67b560b1502c2bd5ba8 28-Sep-2010 Steve Howard <showard@google.com> Manual merge: Moved DownloadManager to android.app

Change-Id: Id1de44459ec1bf53e928cae826047467b355823d
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
e6a05a1aa4697440e9630d12b741b3bae321fe49 27-Jul-2010 Steve Howard <showard@google.com> Serialize threading for download manager testing.

The download manager uses threading in a simple way -- it launches two
threads, UpdateThread and DownloadThread, and both are "fire and
forget". This is fortunate for testing, since it means we can
eliminate multithreading and simply run each thread in order, and
everything still works.

This change does just that, abstracting Thread.start() behind
SystemFacade and making FakeSystemFacade put new threads into a queue
and then run through them serially. This simplifies much of the test
code and makes it all much more predictable.

I've simplified the test code as much as possible here and moved a few
more tests over to PublicApiFunctionalTest, leaving only a minimum in
DownloadManagerFunctionalTest, which will eventually be deleted
altogether. I've also improved testing in some areas -- for example,
we can now test that running notifications get cancelled after the
download completes in a robust way.

There is one test case that checks for race conditions and requires
multithreading. I've moved this into a new ThreadingTest class, which
uses a custom FakeSystemFacade that allows multithreading. I've
extracted AbstractPublicApiTest for the newly shared code.

Change-Id: Ic1d5c76bfa9913fe053174c3d8b516790ca8b25f
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/AbstractPublicApiTest.java