Fix compilation after update to MockWebServer
Neil Fuller [Mon, 27 Oct 2014 10:39:06 +0000 (10:39 +0000)]
Bug: 18083851
(cherry pick from commit f1cd37d8bade42be0632f54dcd61f81711269606)

Change-Id: I93f14e171abc7a52fe2117c8503374734147513b

tests/src/com/android/providers/downloads/PublicApiFunctionalTest.java

index d7b389c..d1048b0 100644 (file)
@@ -61,6 +61,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 @LargeTest
@@ -239,7 +240,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
         return buildResponse(HTTP_OK, STRING_1K)
                .setHeader("Content-length", contentLength)
                .setHeader("Etag", ETAG)
-               .setBytesPerSecond(1024);
+               .throttleBody(1024, 1, TimeUnit.SECONDS);
     }
 
     public void testFiltering() throws Exception {