Fix compilation after update to MockWebServer
Neil Fuller [Mon, 27 Oct 2014 10:39:06 +0000 (10:39 +0000)]
Bug: 18083851
Change-Id: I611263f111627b6550517f7d6772544dfd5ffdc2

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

index bde9581..91304d5 100644 (file)
@@ -59,6 +59,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
@@ -241,7 +242,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 {