diff options
author | Neil Fuller <nfuller@google.com> | 2015-10-01 12:28:33 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-01 12:28:33 +0000 |
commit | 140534546b7082fc034c5d0f642557ec12e9ff1a (patch) | |
tree | 5cee1953ac9facaabdb014b308fca3121900b11a | |
parent | 147e5ea75d85f64f2b051a11ed1879dfa56050e9 (diff) | |
parent | e0d02d710cd1bbcc1a9065ede7f6801f72abe5b7 (diff) | |
download | okhttp-marshmallow-dr-dev.tar.gz |
am e0d02d71: Reduce the memory requirements of a testmarshmallow-dr-dev
* commit 'e0d02d710cd1bbcc1a9065ede7f6801f72abe5b7':
Reduce the memory requirements of a test
-rw-r--r-- | okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLConnectionTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLConnectionTest.java b/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLConnectionTest.java index 3be5a2d..f541c31 100644 --- a/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLConnectionTest.java +++ b/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLConnectionTest.java @@ -2222,7 +2222,7 @@ public final class URLConnectionTest { @Test public void writeTimeouts() throws IOException { // Sockets on some platforms can have large buffers that mean writes do not block when // required. These socket factories explicitly set the buffer sizes on sockets created. - final int SOCKET_BUFFER_SIZE = 256 * 1024; + final int SOCKET_BUFFER_SIZE = 4 * 1024; server.get().setServerSocketFactory( new DelegatingServerSocketFactory(ServerSocketFactory.getDefault()) { @Override @@ -2247,7 +2247,7 @@ public final class URLConnectionTest { connection.setChunkedStreamingMode(0); OutputStream out = connection.getOutputStream(); try { - byte[] data = new byte[16 * 1024 * 1024]; // 16 MiB. + byte[] data = new byte[2 * 1024 * 1024]; // 2 MiB. out.write(data); fail(); } catch (SocketTimeoutException expected) { |