Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
HDFS-13404. RBF: TestRouterWebHDFSContractAppend.testRenameFileBeingA…
Browse files Browse the repository at this point in the history
…ppended fails.
  • Loading branch information
tasanuma authored and brahmareddybattula committed Jun 24, 2019
1 parent 9eed3a4 commit 559cb11
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,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);
Expand Down

0 comments on commit 559cb11

Please sign in to comment.