Browse Source

HADOOP-13798. TestHadoopArchives times out.

(cherry picked from commit b970446b2c59f8897bb2c3a562fa192ed3452db5)
(cherry picked from commit 3b279fe4260d99f95787ea5cce428f9ef337a3cb)
Akira Ajisaka 8 years ago
parent
commit
21f210bada

+ 1 - 1
hadoop-tools/hadoop-archives/src/test/java/org/apache/hadoop/tools/TestHadoopArchives.java

@@ -444,7 +444,7 @@ public class TestHadoopArchives {
       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);