summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/providers/downloads/ThreadingTest.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2016-04-25 14:35:00 -0600
committerJeff Sharkey <jsharkey@android.com>2016-04-25 14:35:00 -0600
commit5210cd471512336a99a327e87160a518857fab35 (patch)
treeb938426523f4b654219fd97bfcd4c62ffcdf9210 /tests/src/com/android/providers/downloads/ThreadingTest.java
parentd12dd16fd9ebe0dbbb4d95ee75292d8516204e8e (diff)
parent3a5f5eafb34eaa4963c801882148e8f61514a61b (diff)
downloadandroid_packages_providers_DownloadProvider-5210cd471512336a99a327e87160a518857fab35.tar.gz
android_packages_providers_DownloadProvider-5210cd471512336a99a327e87160a518857fab35.tar.bz2
android_packages_providers_DownloadProvider-5210cd471512336a99a327e87160a518857fab35.zip
resolve merge conflicts of 3a5f5ea to nyc-dev-plus-aosp
Change-Id: Ib1bf6fc558789dcf9bcf81cea19e551ca9b49642
Diffstat (limited to 'tests/src/com/android/providers/downloads/ThreadingTest.java')
-rw-r--r--tests/src/com/android/providers/downloads/ThreadingTest.java17
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/src/com/android/providers/downloads/ThreadingTest.java b/tests/src/com/android/providers/downloads/ThreadingTest.java
index 1e501444..dda4db5e 100644
--- a/tests/src/com/android/providers/downloads/ThreadingTest.java
+++ b/tests/src/com/android/providers/downloads/ThreadingTest.java
@@ -46,19 +46,6 @@ public class ThreadingTest extends AbstractPublicApiTest {
super.tearDown();
}
- /**
- * Test for race conditions when the service is flooded with startService() calls while running
- * a download.
- */
- public void testFloodServiceWithStarts() throws Exception {
- enqueueResponse(buildResponse(HTTP_OK, FILE_CONTENT));
- Download download = enqueueRequest(getRequest());
- while (download.getStatus() != DownloadManager.STATUS_SUCCESSFUL) {
- startService(null);
- Thread.sleep(10);
- }
- }
-
public void testFilenameRace() throws Exception {
final List<Pair<Download, String>> downloads = Lists.newArrayList();
final HashSet<String> expectedBodies = Sets.newHashSet();
@@ -73,12 +60,10 @@ public class ThreadingTest extends AbstractPublicApiTest {
final Download d = enqueueRequest(getRequest());
downloads.add(Pair.create(d, body));
expectedBodies.add(body);
+ startDownload(d.mId);
}
- // Kick off downloads in parallel
final long startMillis = mSystemFacade.currentTimeMillis();
- startService(null);
-
for (Pair<Download,String> d : downloads) {
d.first.waitForStatus(DownloadManager.STATUS_SUCCESSFUL, startMillis);
}