This is an automated email from the ASF dual-hosted git repository.

sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 1210d8c4e138e445cb9aea302b86a77b801a8086
Author: Stephan Ewen <[email protected]>
AuthorDate: Thu May 2 15:17:03 2019 +0200

    [hotfix] [tests] Fix incomplete buffer reading in S3 test
---
 .../flink/fs/s3/common/writer/RecoverableMultiPartUploadImplTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/flink-filesystems/flink-s3-fs-base/src/test/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImplTest.java
 
b/flink-filesystems/flink-s3-fs-base/src/test/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImplTest.java
index 0194065..6b9f32e 100644
--- 
a/flink-filesystems/flink-s3-fs-base/src/test/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImplTest.java
+++ 
b/flink-filesystems/flink-s3-fs-base/src/test/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImplTest.java
@@ -20,6 +20,7 @@ package org.apache.flink.fs.s3.common.writer;
 
 import org.apache.flink.fs.s3.common.utils.RefCountedBufferingFileStream;
 import org.apache.flink.fs.s3.common.utils.RefCountedFile;
+import org.apache.flink.util.IOUtils;
 import org.apache.flink.util.MathUtils;
 
 import com.amazonaws.services.s3.model.CompleteMultipartUploadResult;
@@ -399,7 +400,7 @@ public class RecoverableMultiPartUploadImplTest {
 
                private byte[] getFileContentBytes(File file, int length) 
throws IOException {
                        final byte[] content = new byte[length];
-                       new FileInputStream(file).read(content, 0, length);
+                       IOUtils.readFully(new FileInputStream(file), content, 
0, length);
                        return content;
                }
 

Reply via email to