HADOOP-13798. TestHadoopArchives times out.

(cherry picked from commit b970446b2c)
(cherry picked from commit 3b279fe426)
This commit is contained in:
Akira Ajisaka 2016-11-07 19:53:43 +09:00
parent ee5dd2c388
commit 21f210bada
1 changed files with 1 additions and 1 deletions

View File

@ -444,7 +444,7 @@ private static byte[] readAllWithBuffer(FSDataInputStream fsdis, boolean close)
int read;
while (true) {
read = fsdis.read(buffer, readIntoBuffer, buffer.length - readIntoBuffer);
if (read < 0) {
if (read <= 0) {
// end of stream:
if (readIntoBuffer > 0) {
baos.write(buffer, 0, readIntoBuffer);