HADOOP-15458. TestLocalFileSystem#testFSOutputStreamBuilder fails on Windows. Contributed by Xiao Liang.

(cherry picked from commit abc3e4bad9)
This commit is contained in:
Inigo Goiri 2018-06-25 09:50:27 -07:00
parent bfdbc9dea2
commit cbe15066c8
1 changed files with 12 additions and 11 deletions

View File

@ -689,7 +689,7 @@ public class TestLocalFileSystem {
// and permission
FSDataOutputStreamBuilder builder =
fileSys.createFile(path);
builder.build();
try (FSDataOutputStream stream = builder.build()) {
Assert.assertEquals("Should be default block size",
builder.getBlockSize(), fileSys.getDefaultBlockSize());
Assert.assertEquals("Should be default replication factor",
@ -700,6 +700,7 @@ public class TestLocalFileSystem {
IO_FILE_BUFFER_SIZE_DEFAULT));
Assert.assertEquals("Should be default permission",
builder.getPermission(), FsPermission.getFileDefault());
}
// Test set 0 to replication, block size and buffer size
builder = fileSys.createFile(path);