HADOOP-15458. TestLocalFileSystem#testFSOutputStreamBuilder fails on Windows. Contributed by Xiao Liang.
(cherry picked from commit abc3e4bad9
)
This commit is contained in:
parent
11e7f2e584
commit
1d457673c8
|
@ -676,17 +676,18 @@ public class TestLocalFileSystem {
|
||||||
// and permission
|
// and permission
|
||||||
FSDataOutputStreamBuilder builder =
|
FSDataOutputStreamBuilder builder =
|
||||||
fileSys.createFile(path);
|
fileSys.createFile(path);
|
||||||
builder.build();
|
try (FSDataOutputStream stream = builder.build()) {
|
||||||
Assert.assertEquals("Should be default block size",
|
Assert.assertEquals("Should be default block size",
|
||||||
builder.getBlockSize(), fileSys.getDefaultBlockSize());
|
builder.getBlockSize(), fileSys.getDefaultBlockSize());
|
||||||
Assert.assertEquals("Should be default replication factor",
|
Assert.assertEquals("Should be default replication factor",
|
||||||
builder.getReplication(), fileSys.getDefaultReplication());
|
builder.getReplication(), fileSys.getDefaultReplication());
|
||||||
Assert.assertEquals("Should be default buffer size",
|
Assert.assertEquals("Should be default buffer size",
|
||||||
builder.getBufferSize(),
|
builder.getBufferSize(),
|
||||||
fileSys.getConf().getInt(IO_FILE_BUFFER_SIZE_KEY,
|
fileSys.getConf().getInt(IO_FILE_BUFFER_SIZE_KEY,
|
||||||
IO_FILE_BUFFER_SIZE_DEFAULT));
|
IO_FILE_BUFFER_SIZE_DEFAULT));
|
||||||
Assert.assertEquals("Should be default permission",
|
Assert.assertEquals("Should be default permission",
|
||||||
builder.getPermission(), FsPermission.getFileDefault());
|
builder.getPermission(), FsPermission.getFileDefault());
|
||||||
|
}
|
||||||
|
|
||||||
// Test set 0 to replication, block size and buffer size
|
// Test set 0 to replication, block size and buffer size
|
||||||
builder = fileSys.createFile(path);
|
builder = fileSys.createFile(path);
|
||||||
|
|
Loading…
Reference in New Issue