Fix DisconnectTest for devices with large socket buffers
Similar to commit e3bfefb13c93006a2fbe22363572a314f6c18659
but for DisconnectTest. The buffer sizes are large on some
devices so the expectation that they take a lot of time to
stream data is invalid because they just write into the
buffers.
Bug: 18703696
Change-Id: I6127b044bf7fefc192f577d0b035deacbc54dd5f
diff --git a/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/DisconnectTest.java b/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/DisconnectTest.java
index db84214..2b05638 100644
--- a/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/DisconnectTest.java
+++ b/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/DisconnectTest.java
@@ -32,7 +32,7 @@
private final OkHttpClient client = new OkHttpClient();
@Test public void interruptWritingRequestBody() throws Exception {
- int requestBodySize = 2 * 1024 * 1024; // 2 MiB
+ int requestBodySize = 10 * 1024 * 1024; // 10 MiB
server.enqueue(new MockResponse()
.throttleBody(64 * 1024, 125, TimeUnit.MILLISECONDS)); // 500 Kbps
@@ -58,7 +58,7 @@
}
@Test public void interruptReadingResponseBody() throws Exception {
- int responseBodySize = 2 * 1024 * 1024; // 2 MiB
+ int responseBodySize = 10 * 1024 * 1024; // 10 MiB
server.enqueue(new MockResponse()
.setBody(new byte[responseBodySize])