HADOOP-13798. TestHadoopArchives times out.
(cherry picked from commit b970446b2c59f8897bb2c3a562fa192ed3452db5)
This commit is contained in:
parent
f30d338766
commit
3b279fe426
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user