fix broken DownloadManager tests
authorVasu Nori <vnori@google.com>
Mon, 6 Dec 2010 23:16:23 +0000 (15:16 -0800)
committerVasu Nori <vnori@google.com>
Fri, 10 Dec 2010 01:22:38 +0000 (17:22 -0800)
commit5d217003acf21aea852975af0dff3b398cea6768
treec9cf9a9fe823d667544e2e4ecd4b9f9bff5db670
parent00caf765965d4356308b36ce387e14854cedfcdd
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
tests/src/com/android/providers/downloads/AbstractDownloadManagerFunctionalTest.java
tests/src/com/android/providers/downloads/AbstractPublicApiTest.java
tests/src/com/android/providers/downloads/DownloadManagerFunctionalTest.java
tests/src/com/android/providers/downloads/FakeSystemFacade.java
tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java
tests/src/tests/http/MockResponse.java
tests/src/tests/http/MockWebServer.java