HADOOP-12268. AbstractContractAppendTest#testRenameFileBeingAppended misses rename operation. Contributed by Zhihai Xu

This commit is contained in:
Zhihai Xu 2015-07-31 21:32:45 -07:00
parent d311a38a6b
commit a628a6f126
2 changed files with 5 additions and 2 deletions

View File

@ -1041,6 +1041,9 @@ Release 2.8.0 - UNRELEASED
each platform, not hardcoded to their Linux values (Martin Walsh via Colin
P. McCabe)
HADOOP-12268. AbstractContractAppendTest#testRenameFileBeingAppended
misses rename operation. (Zhihai Xu)
Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -24,13 +24,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.apache.hadoop.fs.contract.ContractTestUtils.cleanup;
import static org.apache.hadoop.fs.contract.ContractTestUtils.createFile;
import static org.apache.hadoop.fs.contract.ContractTestUtils.dataset;
import static org.apache.hadoop.fs.contract.ContractTestUtils.touch;
/**
* Test concat -if supported
* Test append -if supported
*/
public abstract class AbstractContractAppendTest extends AbstractFSContractTestBase {
private static final Logger LOG =
@ -112,6 +111,7 @@ public void testRenameFileBeingAppended() throws Throwable {
FSDataOutputStream outputStream = getFileSystem().append(target);
outputStream.write(dataset);
Path renamed = new Path(testPath, "renamed");
rename(target, renamed);
outputStream.close();
String listing = ls(testPath);