diff --git a/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java b/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java
+++ b/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java
@@ -210,7 +210,7 @@ public class AppendableByteArrayInputStreamTest
           {
             try {
               byte[] readBytes = new byte[10];
-              in.read(readBytes);
+              while (in.read(readBytes) != -1);
               return readBytes;
             }
             catch (IOException e) {
Read until EOF (which shouldn't happen...)