HDFS-13404. RBF: TestRouterWebHDFSContractAppend.testRenameFileBeingAppended fails.
(cherry picked from commit 559cb11551d7045015aa60afe7e7998fe0b2ef13)
This commit is contained in:
parent
066d6f5d0d
commit
bdcca33e7c
@ -136,6 +136,12 @@ public void testRenameFileBeingAppended() throws Throwable {
|
||||
assertPathExists("original file does not exist", target);
|
||||
byte[] dataset = dataset(256, 'a', 'z');
|
||||
FSDataOutputStream outputStream = getFileSystem().append(target);
|
||||
if (isSupported(CREATE_VISIBILITY_DELAYED)) {
|
||||
// Some filesystems like WebHDFS doesn't assure sequential consistency.
|
||||
// In such a case, delay is needed. Given that we can not check the lease
|
||||
// because here is closed in client side package, simply add a sleep.
|
||||
Thread.sleep(10);
|
||||
}
|
||||
outputStream.write(dataset);
|
||||
Path renamed = new Path(testPath, "renamed");
|
||||
rename(target, renamed);
|
||||
|
Loading…
x
Reference in New Issue
Block a user